This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Can anyone possibly explain to me who/what could be the culprit of the exception below? Context: RMI client code in a jsp file running on Tomcat 4.0 tries to make a remote method call to a remote server. Simplified below: RemoteInterface ri = (RemoteInterface)Naming.lookup("//.../RemoteServer"); ri.remoteFunc(); // Exception happens here! I'm not sure how to interpret the exception- Is it a tomcat problem? Is is a client problem? A server problem? Can anyone shed some light? I would really appreciate it. java.rmi.MarshalException: Error marshaling transport header; nested exception is: java.net.SocketException: Connection reset by peer: Connection reset by peer java.net.SocketException: Connection reset by peer: Connection reset by peer at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:90) at java.io.BufferedInputStream.fill(BufferedInputStream.java:186) at java.io.BufferedInputStream.read(BufferedInputStream.java:204) at java.io.DataInputStream.readByte(DataInputStream.java:222) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:83) at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:120) at server.RemoteServer_Stub.remoteFunc(Unknown Source) at org.apache.jsp.YourPage$jsp._jspService(YourPage$jsp.java:1054) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) ... at java.lang.Thread.run(Thread.java:484)
** EDIT ** I left out the casting to a RemoteInterface when I called Naming.lookup, but in the actual code it is there. [ December 17, 2002: Message edited by: David Duran ]
I'm tempted to say that whatever server your Tomcat is contacting probably doesn't like something about your handshake. I see this from time to time on servers that will not accept a "raw IP" address from clients -- you have to come from some domain or it will drop you. I searched around a bit and I found multiple versions of this question, none of them answered. An error in transport is probably the general way of saying, "something beyond our control went wrong."