Recently, the use of JMX in the robot program, ready to make a remote call, the client is the Web, deployed on JBoss, the local test is good, sent to pre-release is not,
Error Description: Failed to retrieve Rmiserver Stub:javax.naming.namenotfoundexception:rmi://10.6.54.232:9734/ffmmendservice-- Service Jboss.naming.context.java.rmi:. " 10.6.54.232:9734 ". Ffmmendservice
More information:
Javax.management.remote.rmi.RMIConnector.connect (rmiconnector.java:369) Javax.management.remote.JMXConnectorFactory.connect (jmxconnectorfactory.java:270) Org.springframework.jmx.support.mbeanserverconnectionfactorybean$jmxconnectorlazyinittargetsource.createobject (mbeanserverconnectionfactorybean.java:188) Org.springframework.aop.target.AbstractLazyCreationTargetSource.getTarget ( abstractlazycreationtargetsource.java:86) Org.springframework.aop.framework.JdkDynamicAopProxy.invoke ( jdkdynamicaopproxy.java:187) com.sun.proxy. $Proxy 81.getMBeanServerConnection (Unknown Source) org.springframework.jmx.support.mbeanserverconnectionfactorybean$ Mbeanserverconnectionlazyinittargetsource.createobject (mbeanserverconnectionfactorybean.java:205) Org.springframework.aop.target.AbstractLazyCreationTargetSource.getTarget ( abstractlazycreationtargetsource.java:86) Org.springframework.aop.framework.JdkDynamicAopProxy.invoke ( jdkdynamicaopproxy.java:187) com.sun.proxy. $Proxy 83.iNvoke (Unknown Source)
....
Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:246) Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:214) Org.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:231) Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:149) Org.jboss.modcluster.container.jbossweb.jbosswebcontext$requestlistenervalve.event (JBossWebContext.java:91) Org.jboss.modcluster.container.jbossweb.jbosswebcontext$requestlistenervalve.invoke (JBossWebContext.java:72) Org.jboss.as.web.session.ClusteredSessionValve.handleRequest (clusteredsessionvalve.java:134) Org.jboss.as.web.session.ClusteredSessionValve.invoke (clusteredsessionvalve.java:99) Org.jboss.as.web.session.JvmRouteValve.invoke (jvmroutevalve.java:92) Org.jboss.as.web.session.LockingValve.invoke (lockingvalve.java:64) Org.jboss.as.web.security.SecurityContextAssociationValve.invoke (Securitycontextassociationvalve.java:169) Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:145) Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:97) Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:102) Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:344) Org.apache.coyote.http11.Http11Processor.process (http11processor.java:856) Org.apache.coyote.http11.http11protocol$http11connectionhandler.process (http11protocol.java:653) Org.apache.tomcat.util.net.jioendpoint$worker.run (jioendpoint.java:926) Java.lang.Thread.run (thread.java:745)
Beginning always thought is the service side not good, changed the port what, or not, carefully see the error, see service Jboss.naming.context.java.rmi:. " 10.6.54.232:9734 ". Ffmmendservice, suspected to be the problem of JBoss, sure enough
Workaround:
Modify the following file
/jboss-eap-6.3/modules/system/layers/base/sun/jdk/main/module.xml
Find Path Name= ... Position, add a row (Red section)
<dependencies>
<system export= "true" >
<paths>
<path name= "Sun/rmi/server"/>
<path name= "Com/sun/script/javascript"/>
<path name= "jdk/nashorn/api/scripting"/>
...
<path name= "Com/sun/jndi/dns"/>
<path name= "Com/sun/jndi/ldap"/>
<path name= "Com/sun/jndi/url"/>
<path name= "Com/sun/jndi/url/rmi"/>
<path name= "Com/sun/jndi/url/corbaname"/>
<path name= "Com/sun/jndi/url/dns"/>
<path name= "Com/sun/jndi/url/iiop"/>
<path name= "Com/sun/jndi/url/iiopname"/>
<path name= "Com/sun/jndi/url/ldap"/>
<path name= "Com/sun/jndi/url/ldaps"/>
...
Reference article:
Javax.naming.NameNotFoundException:rmi: ....
JBoss deployment appears jboss.naming.context.java.rmi error not found