I've been using ObjectDB with Groovy 2.1 and Java 7 for nearly a year. Today, I updated everything to the latest revs (Groovy 2.3.6, Java 1.8.0_25, and ObjectDB 2.5.7_05), and now my application fails when opening the database.
It's dying on one of these lines:
emf = Persistence.createEntityManagerFactory (dbName) em = emf.createEntityManager() em.setFlushMode(FlushModeType.AUTO) ObjectDB.em = em
Exception in thread "main" java.lang.ExceptionInInitializerError at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1844) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3690) at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at com.tradeunafraid.TradeUnafraid.init(TradeUnafraid.groovy:127) at com.tradeunafraid.TradeUnafraid$init$0.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at com.tradeunafraid.TradeUnafraid.run(TradeUnafraid.groovy:64) at com.tradeunafraid.TradeUnafraid$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.tradeunafraid.TradeUnafraid.main(TradeUnafraid.groovy:723) Caused by: com.objectdb.o._PersistenceException: Failed to generate dynamic type java.util.HashMap$Entry at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45) at com.objectdb.o.JPE.g(JPE.java:145) at com.objectdb.o.ERR.f(ERR.java:56) at com.objectdb.o.OST.onObjectDBError(OST.java:596) at com.objectdb.jpa.EMF.createEntityManager(EMF.java:260) at javax.persistence.EntityManagerFactory$createEntityManager.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.tradeunafraid.TUActor.<init>(TUActor.groovy:53) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) at com.tradeunafraid.TUActor.<clinit>(TUActor.groovy) ... 21 more Caused by: com.objectdb.o.UserException: Failed to generate dynamic type java.util.HashMap$Entry at com.objectdb.o.MSG.d(MSG.java:75) at com.objectdb.o.ACL.d(ACL.java:167) at com.objectdb.o.STL.g(STL.java:97) at com.objectdb.o.TYM.findClass(TYM.java:1036) at com.objectdb.o.ACL.loadClass(ACL.java:131) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at com.objectdb.o.TYM.ay(TYM.java:1013) at com.objectdb.o.UTY.initSysType(UTY.java:331) at com.objectdb.o.TYS.l(TYS.java:166) at com.objectdb.o.TYM.ae(TYM.java:511) at com.objectdb.o.TYM.<init>(TYM.java:194) at com.objectdb.o.OMF.ao(OMF.java:811) at com.objectdb.o.OMF.an(OMF.java:765) at com.objectdb.jpa.EMF.an(EMF.java:238) at com.objectdb.o.OMF.am(OMF.java:693) at com.objectdb.jpa.EMF.createEntityManager(EMF.java:257) ... 36 more Caused by: java.lang.SecurityException: Prohibited package name: java.util at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.lang.ClassLoader.defineClass(ClassLoader.java:642) at com.objectdb.o.ACL.d(ACL.java:155) ... 50 more