Hi, I have folowing problem: I have client JavaWS application and server, when I pass a collection to client via RMI I have exception:
java.lang.ClassNotFoundException: org.hibernate.collection.PersistentSet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
I think this because objects in the collection is proxied, if I do folowing all is all is right:
List<ValueScope> allVisible = dao.getAllVisible();
List<ValueScope> all = new ArrayList<ValueScope>();
for(ValueScope vs : allVisible)
all.add((ValueScope)vs.getPlainCopy());
return all;
can I turn of proxing in hibernate, or I must return plain copy in all bethods of business objects that return data.
I don't want include hibernate to the client because size is very important
|