Hello all -
I'm using HttpInvokerProxyFactoryBean to create a simple Spring RMI service. Some of the method calls on the server return CGLIB proxied objects to the client. My general question is, is this a valid thing to do? In other words, is something like this supported?
The error I get is:
This leads me to believe that the client side is looking to build the class from a name, and its dying because CGLIB added the $$EnhancerByCGLIB$$ part. I'm pretty sure CGLIB proxies are serializable, but perhaps there's something that limits them from being sent back and forth via RMI. Any info would be great.Code:Exception in thread "main" org.springframework.remoting.RemoteAccessException: Cannot deserialize result from HTTP invoker remote service [http://localhost:8080/myservice50/http/applicationService]; nested exception is java.lang.ClassNotFoundException: org.evs.LazyLoadableCodeToReturn$$EnhancerByCGLIB$$7aa18e06 Caused by: java.lang.ClassNotFoundException: org.evs.helpers.lazyloading.LazyLoadableCodeToReturn$$EnhancerByCGLIB$$7aa18e06 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) 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 org.springframework.remoting.rmi.CodebaseAwareObjectInputStream.resolveClass(CodebaseAwareObjectInputStream.java:99) ...
Thanks, Kevin


Reply With Quote