Problème avec RMI connection avec JBOSS - Java - Programmation
MarshPosté le 25-01-2007 à 20:54:25
Bonjour,
J'ai un problème, je veux accéder au méthode proposé par les Mbeans dans JBOSS. Le problème est que je n'y arrive pas , je pense que je prend pas le bon url. voici mon code :
java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.io.EOFException] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:323) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248) at test.testObserverESB.main(testObserverESB.java:17) Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.io.EOFException] at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101) at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185) at javax.naming.InitialContext.lookup(InitialContext.java:392) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1871) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1841) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257) ... 2 more Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.io.EOFException at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97) ... 7 more Caused by: java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:250) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228) ... 11 more
Si vous avez une idée comment résoudre ce problème merciiiiiii
Marsh Posté le 25-01-2007 à 20:54:25
Bonjour,
J'ai un problème, je veux accéder au méthode proposé par les Mbeans dans JBOSS. Le problème est que je n'y arrive pas , je pense que je prend pas le bon url.
voici mon code :
JMXServiceURL url = new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://localhost:8080/jmx-console" );
JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
String domain = "org.servicemix";
ObjectName stdMBeanName =new ObjectName(domain+":type=org.servicemix.jbi.container.JBIContainer,index=1" );
mbsc.invoke(stdMBeanName, "start", null, null);
L'erreur que j'obtiens
java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:323)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at test.testObserverESB.main(testObserverESB.java:17)
Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1871)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1841)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
... 2 more
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
... 7 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:250)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
... 11 more
Si vous avez une idée comment résoudre ce problème merciiiiiii