Announcement Announcement Module
Collapse
No announcement yet.
HttpInvoker server side deserialization problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HttpInvoker server side deserialization problem

    Hello,

    I am using the HttpInvoker classes to develop a client server application. Everything works perfectly in the development enviroment on my local computer. When I install the application on the server it works find for server - client communication, but all client - server communication fails. Below is an example of the stack trace. Both the local development enviroment and the server are running tomcat 5.5.9.

    Code:
    java.lang.ClassNotFoundException: com.whiteboardapplications.estore.data.Brand
           at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:242)
           at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:574)
           at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
           at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
           at java.util.ArrayList.readObject(ArrayList.java:587)
           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:585)
           at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
           at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
           at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
           at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
           at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
           at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.doReadRemoteInvocation(HttpInvokerServiceExporter.java:152)
           at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.readRemoteInvocation(HttpInvokerServiceExporter.java:119)
           at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.readRemoteInvocation(HttpInvokerServiceExporter.java:97)
    I have not been able to reproduce this error on my local machine. From the stack trace I expect that this has something to do with classloaders in tomcat. Any suggetions as to how to solve this issue would be appreciated.

    -John Atwood

  • #2
    I would assume the affected class is not available in the classpath of the WAR. When deserializing "not available" can also mean a class used by the affected class is not available. This could for example indicate a jar file that's available in the lib directory of the tomcat development instance is not available in the tomcat acceptance/production instance.

    Comment

    Working...
    X