NPE in JBossWS on JBoss 4.2.2 with jmxremote enabled

I am trying to configure JBoss 4.2.2 and JConsole for remote monitoring. Following many of the best practices I found on the Internet for this, you need to enable jmxremote by setting the following parameters in run.conf. (I understand that the other two options have disabled authentication)

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=11099"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false" 

This results in the following exception:

13:06:56,418 INFO [TomcatDeployer] performDeployInternal :: deploy, ctxPath=/services, warUrl=.../tmp/deploy/tmp34585xxxxxxxxx.ear-contents/mDate-Services-exp.war/
13:06:57,706 WARN [AbstractServerConfig] getWebServicePort :: Unable to calculate 'WebServicePort', using default '8080'
13:06:57,711 WARN [AbstractServerConfig] getWebServicePort :: Unable to calculate 'WebServicePort', using default '8080'
13:06:58,070 WARN [AbstractServerConfig] getWebServicePort :: Unable to calculate 'WebServicePort', using default '8080'
13:06:58,071 WARN [AbstractServerConfig] getWebServicePort :: Unable to calculate 'WebServicePort', using default '8080'
13:06:58,138 ERROR [MainDeployer] start :: Could not start deployment: file:/opt/jboss-4.2.2.GA/server/default/tmp/deploy/tmp34585xxxxxxxxx.ear-contents/xxxxx-Services.war
java.lang.NullPointerException
at org.jboss.wsf.stack.jbws.WSDLFilePublisher.getPublishLocation(WSDLFilePublisher.java:303)
at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:103)
at org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect.create(PublishContractDeploymentAspect.java:52)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97) 
...

My application uses JWS, which according to this error:

https://jira.jboss.org/jira/browse/JBWS-1943

Suggests this method:

JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"

( https://developer.jboss.org/wiki/JBossWS-FAQ#jive_content_id_How_to_use_JDK_JMX_JConsole_with_JBossWS )

, sar , , Schedulable , :

Caused by: java.lang.NullPointerException
at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.hash(ConcurrentReaderHashMap.java:298)
at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.get(ConcurrentReaderHashMap.java:410)
at org.jboss.mx.server.registry.BasicMBeanRegistry.getMBeanMap(BasicMBeanRegistry.java:959)
at org.jboss.mx.server.registry.BasicMBeanRegistry.contains(BasicMBeanRegistry.java:577)

, ?

EDIT:

:

JAVA_OPTS="$JAVA_OPTS -DmbipropertyFile=../server/default/conf/mbi.properties  -DpropertyFile=../server/default/conf/mdate.properties -Dwicket.configuration=DEVELOPMENT"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"

JDK 1.6.0_01-b06

+3
5

. , , , Linux * nixes SSH, ssh -XCA JConsole X . JConsole, JVM, , .

, , , JConsole JWS.

+2

, , /tmp /work JBoss/default WAR. , JDK, 1.6. 1.6.0_01 .

0

, - , WS mbean, JConsole JVM. "service: jmx: rmi:///jndi/rmi://< remote-machine > : <port> /jmxrmi" ( < remote-machine > - , < > 11099) .

1,6 JVM, mbean (JBoss, ActiveMQ ..).

0

, , JBoss . , , jboss.localdomain: 3873, ejb, JBoss , . , (, jboss.publicdomain.com) jboss.publicdomain.com:1099. DNS .

, " ", , .

0

Had a similar problem, but with JBoss Seam: see JBSEAM-4029 . As one of the workarounds, it is proposed to override the class running in NPE - in the case of Seam JBossClusterMonitor.

I am sure that the JWS code is running in the same problem, that is, it ultimately causes a call MBeanServerFactory.findMBeanServer(null)at a certain point in time. The stack trace should show which class does this.

0
source

Source: https://habr.com/ru/post/1697485/


All Articles