Thread: [Mc4j-development] Error while connecting using MC4J with Tomcat 4.1.24
Brought to you by:
ghinkl
From: Alex R. M. <ale...@ap...> - 2006-08-22 16:50:01
|
Hello, I am having problem making MC4J 1.2 beta 9, work with tomcat 4.1.24 (yes its old, but we are in process of upgrading). Here are the issues: 1. In the documentation that I was able to gather, its mentioned to modify the jk2.properties with the following line of code: mx.port=9000 But when I make this change and restart tomcat, even my normal http request are picked up by the mx4j adaptor, as seen in the log below. What could I be doing wrong for this to happen? Exception during http request mx4j.adaptor.http.HttpException: HTTP/1.1 at mx4j.adaptor.http.HttpInputStream.parseMethod(HttpInputStream.java:633) at mx4j.adaptor.http.HttpInputStream.readRequest(HttpInputStream.java:277) at mx4j.adaptor.http.HttpAdaptor$HttpClient.run(HttpAdaptor.java:965) 2. In the forums, I read that just the line mx.port=9000 is not all that needs to be added, but mx.enabled=true mx.jrmpPort=90007 mx.jrmpHost=localhost Also needs to be added. Is this all, or something else is needed too. 3. While I try to connect to the tomcat server from the MC4J application, I get the following error: 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:317) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java :247) at org.mc4j.console.connection.JSR160ConnectionNode.connect(JSR160ConnectionNod e.java:132) at org.mc4j.console.connection.ReconnectAction.performAction(ReconnectAction.ja va:47) at org.openide.util.actions.NodeAction$3.run(NodeAction.java:440) at org.openide.util.actions.CallableSystemAction$ActionRunnable.actionPerformed (CallableSystemAction.java:247) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.openide.util.actions.CallableSystemAction.invokeAction(CallableSystemAct ion.java:179) at org.openide.util.actions.CallableSystemAction.access$000(CallableSystemActio n.java:31) at org.openide.util.actions.CallableSystemAction$ActionRunnable.doRun(CallableS ystemAction.java:241) at org.openide.util.actions.CallableSystemAction$2.run(CallableSystemAction.jav a:111) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686) 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:92) at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185 ) at javax.naming.InitialContext.lookup(InitialContext.java:347) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java :1785) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:175 1) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:259) ... 17 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:274) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:88) ... 22 more Caused by: java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:333) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:215) Any help will be really appreciated. Regards, Robin |
From: Alex R. M. <ale...@ap...> - 2006-08-23 01:29:44
|
Hi, I was able to successfully move ahead and get to this error pasted below now. Can someone please let me know what am I doing wrong. I have all the jar files copied at the server and client locations. Where is this mx4j.adaptor.rmi.RMIAdaptor_Stub located? Please let me know if I should not be emailing at this id and at the same note it will be appreciated if you could point me to the right one. Regards, Robin java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.RMIAdaptor_Stub] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:317) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java :247) at org.mc4j.console.connection.JSR160ConnectionNode.connect(JSR160ConnectionNod e.java:132) at org.mc4j.console.connection.ReconnectAction.performAction(ReconnectAction.ja va:47) at org.openide.util.actions.NodeAction$3.run(NodeAction.java:440) at org.openide.util.actions.CallableSystemAction$ActionRunnable.actionPerformed (CallableSystemAction.java:247) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.openide.util.actions.CallableSystemAction.invokeAction(CallableSystemAct ion.java:179) at org.openide.util.actions.CallableSystemAction.access$000(CallableSystemActio n.java:31) at org.openide.util.actions.CallableSystemAction$ActionRunnable.doRun(CallableS ystemAction.java:241) at org.openide.util.actions.CallableSystemAction$2.run(CallableSystemAction.jav a:111) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686) Caused by: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.RMIAdaptor_Stub] at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:92) at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185 ) at javax.naming.InitialContext.lookup(InitialContext.java:347) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java :1785) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:175 1) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:259) ... 17 more Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.RMIAdaptor_Stub at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:88) ... 22 more Caused by: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.RMIAdaptor_Stub at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) [catch] ... 24 more |
From: Greg H. <gre...@gm...> - 2006-08-23 14:37:13
|
Sorry, been quite busy lately. If I remember correctly, MX4J at some point stopped including their proprietary adaptor in their release. I think they only ship with the standard JSR160 compatible connector. I don't know what version that was, you'd have to ask on the MX4J project list or check its archives, but I know people have worked this out. - Greg On Aug 22, 2006, at 9:30 PM, Alex Robin Marian wrote: > Hi, > I was able to successfully move ahead and get to this error > pasted below now. Can someone please let me know what am I doing > wrong. I have all the jar files copied at the server and client > locations. Where is this mx4j.adaptor.rmi.RMIAdaptor_Stub located? > > Please let me know if I should not be emailing at this id and at > the same note it will be appreciated if you could point me to the > right one. > > Regards, > Robin > > > > java.io.IOException: Failed to retrieve RMIServer stub: > javax.naming.CommunicationException [Root exception is > java.rmi.UnmarshalException: error unmarshalling return; nested > exception is: > java.lang.ClassNotFoundException: > mx4j.adaptor.rmi.RMIAdaptor_Stub] > at javax.management.remote.rmi.RMIConnector.connect > (RMIConnector.java:317) > at javax.management.remote.JMXConnectorFactory.connect > (JMXConnectorFactory.java:247) > at org.mc4j.console.connection.JSR160ConnectionNode.connect > (JSR160ConnectionNode.java:132) > at org.mc4j.console.connection.ReconnectAction.performAction > (ReconnectAction.java:47) > at org.openide.util.actions.NodeAction$3.run(NodeAction.java:440) > at org.openide.util.actions.CallableSystemAction > $ActionRunnable.actionPerformed(CallableSystemAction.java:247) > at org.netbeans.core.ModuleActions.invokeAction > (ModuleActions.java:74) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.openide.util.actions.CallableSystemAction.invokeAction > (CallableSystemAction.java:179) > at org.openide.util.actions.CallableSystemAction.access$000 > (CallableSystemAction.java:31) > at org.openide.util.actions.CallableSystemAction > $ActionRunnable.doRun(CallableSystemAction.java:241) > at org.openide.util.actions.CallableSystemAction$2.run > (CallableSystemAction.java:111) > at org.openide.util.Task.run(Task.java:136) > at org.openide.util.RequestProcessor$Task.run > (RequestProcessor.java:330) > at org.openide.util.RequestProcessor$Processor.run > (RequestProcessor.java:686) > Caused by: javax.naming.CommunicationException [Root exception is > java.rmi.UnmarshalException: error unmarshalling return; nested > exception is: > java.lang.ClassNotFoundException: > mx4j.adaptor.rmi.RMIAdaptor_Stub] > at com.sun.jndi.rmi.registry.RegistryContext.lookup > (RegistryContext.java:92) > at com.sun.jndi.toolkit.url.GenericURLContext.lookup > (GenericURLContext.java:185) > at javax.naming.InitialContext.lookup(InitialContext.java:347) > at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI > (RMIConnector.java:1785) > at javax.management.remote.rmi.RMIConnector.findRMIServer > (RMIConnector.java:1751) > at javax.management.remote.rmi.RMIConnector.connect > (RMIConnector.java:259) > ... 17 more > Caused by: java.rmi.UnmarshalException: error unmarshalling return; > nested exception is: > java.lang.ClassNotFoundException: mx4j.adaptor.rmi.RMIAdaptor_Stub > at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) > at com.sun.jndi.rmi.registry.RegistryContext.lookup > (RegistryContext.java:88) > ... 22 more > Caused by: java.lang.ClassNotFoundException: > mx4j.adaptor.rmi.RMIAdaptor_Stub > at java.net.URLClassLoader$1.run(URLClassLoader.java:199) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:187) > at java.lang.ClassLoader.loadClass(ClassLoader.java:289) > at java.lang.ClassLoader.loadClass(ClassLoader.java:235) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:219) > at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430) > at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165) > at java.rmi.server.RMIClassLoader$2.loadClass > (RMIClassLoader.java:631) > at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java: > 257) > at sun.rmi.server.MarshalInputStream.resolveClass > (MarshalInputStream.java:200) > at java.io.ObjectInputStream.readNonProxyDesc > (ObjectInputStream.java:1513) > at java.io.ObjectInputStream.readClassDesc > (ObjectInputStream.java:1435) > at java.io.ObjectInputStream.readOrdinaryObject > (ObjectInputStream.java:1626) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java: > 1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java: > 324) > [catch] ... 24 more > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642______________________________ > _________________ > Mc4j-development mailing list > Mc4...@li... > https://lists.sourceforge.net/lists/listinfo/mc4j-development |