[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 |