(I'm using Hibernate 2.1)
I'm incorporating Hibernate into the backend of a client-server Swing program. The server has multiple RMI services that query for and pass off objects to the client. I'm currently converting the first service to use Hibernate as a test/proof of concept.
Things are going fairly well on the server side - Hibernate is correctly querying for and generating objects (whee!). I've also written a stand-alone test that doesn't use RMI, and I'm successfully creating objects, modifying, deleting, querying, etc. (So I know my mappings work) However, when I attempt to hand the generated objects off to the client over RMI, I get the following exception on the client side:
WARNING: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: net.sf.hibernate.collection.List (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
Hibernate seems to be wrapping a java.util.List member variable in my object in it's own class, net.sf.hibernate.collection.List, changing the class at runtime. I suppose I could get around this by just including all the neccessary Hibernate jars in the client, but we really don't want the client to know anything about Hibernate at all (or anything else used behind the scenes on the server).
Is there any mechanism to 'un-wrap' collections (or other data members) that have been wrapped by Hibernate? How have other people addressed this?
thanks!
~kevin
|