the specific problem i can't get over is, even with all the classes loaded, an untyped query:
List result = em.createQuery(queryString).getResultList();
throws an exception like this:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:636)
Caused by: com.objectdb.o.InternalException: Unexpected internal exception
at com.objectdb.o.CLS.T(CLS.java:367)
at com.objectdb.o.CLS.S(CLS.java:329)
at com.objectdb.o.CLS.Q(CLS.java:274)
at com.objectdb.o.CST.UO(CST.java:499)
at com.objectdb.o.QRR.g(QRR.java:232)
at com.objectdb.o.QRR.b(QRR.java:151)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:686)
at foo.TestQuery.transact(TestQuery.java:154)
at foo.TestQuery.main(TestQuery.java:403)
... 6 more
Caused by: com.objectdb.o.UserException: Failed to deserialize (com.objectdb.o.HMP$F; local class incompatible: stream classdesc serialVersionUID = 7888310505984857729, local class serialVersionUID = -4638987908756508097)
at com.objectdb.o.MSG.d(MSG.java:74)
at com.objectdb.o.BYR.ac(BYR.java:807)
at com.objectdb.o.BYR.ac(BYR.java:747)
at com.objectdb.o.CLS.T(CLS.java:361)
... 14 more
Caused by: java.io.InvalidClassException: com.objectdb.o.HMP$F; local class incompatible: stream classdesc serialVersionUID = 7888310505984857729, local class serialVersionUID = -4638987908756508097
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:579)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1684)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1340)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1963)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1887)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1963)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1887)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at com.objectdb.o.BYR.ac(BYR.java:782)
... 16 more
even if it is just SELECT a FROM Apple a or SELECT Orange o, and even with some freaky class loading of bar.Apple going on successfully beforehand.
with the class loaded, my thinking was that i just needed to make ObjectDB aware of it somehow.