I use jackson (via resteasy) to convert json to a Java object. I’ve only defined an interface for the object and jackson generates the implementation automatically. Great!
Now I’m trying to save the object and restore it later. My interface extends Serializable, so my datastore saves it without complaint. When it comes time to load it later, though, the generated class definition is nowhere to be found. I get
java.lang.ClassNotFoundException: org.codehaus.jackson.generated.my.class.name
What are my options for saving and loading objects with class definitions generated by Jackson?
Maybe serialize POJO as
java.util.Mapinstead? JDK serialization is tightly bound to concrete classes, so it may not work well with Jackson’s abstract type materialization (I assume you are using “Mr Bean” module).