I am creating MVC Spring webapp. Usage: Jetty (servlet container), DataNucleus (dao platform), DB4O (built-in data storage).
When I save an object (made from a Spring controller) using JDO from the DataNucleus, it saves perfectly to the database.
@PersistenceCapable public class Test { @Persistent private String testString;
When I make a simple request for previously added objects, I get a ClassCastException in my Test class (cannot distinguish abcTest to abcTest ).
The Test class loader returned by JDO is (toString) [ sun.misc.Launcher$AppClassLoader@5acac268 ] , the class class loader of the Test class, before I saved it to the database, [ WebAppClassLoader@1593275665 ]
I got this far, but I really don't know what to do with a classloader problem like this, I have never thought about class loaders before. Any direction is useful.
source share