Hi,
I've had an issue that started today and it's got me stumped. I've got a subclass User, which extends a BaseEntity. The BaseEntity has a @PreUpdate as per:
@PreUpdate public void update(){ System.out.println(" ********* Called update() **********"); lastUpdatedDate = new Date(); }
I've managed to deduce that it only happens when classes are enhanced. When they are not enhanced, everything works fine. Once the error is hit, it keeps on happening and until I remove the enhancement (I do this build time with maven).
First, for the test case I supplied:
1) You need to run test test repeatedly (it is a repeatable test) to expose the issue
2) Once you get the issue, comment out the method "enhanceClasses()" - this shows that it does not happen anymore.
On Glassfish it does the same thing but the app dies with "OutOfMemoryError" but the underlying condition is hard to see - Glassfish doesn't report any objectdb errors. In glassfish I run client/server, but the test is running embedded.
Example output of error
.... ********* Called update() ********** ********* Called update() ********** ********* Called update() ********** ********* Called update() ********** ********* Called update() ********** ********* Called update() ********** ********* Called update() ********** Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.objectdb.o.MSS at com.objectdb.o.ECI.invoke(ECI.java:101) at com.objectdb.o.EDS.i(EDS.java:241) at com.objectdb.jpa.EMImpl.fire(EMImpl.java:1083) at com.objectdb.jpa.EMImpl.bd(EMImpl.java:1036) at com.objectdb.jdo.PMImpl.bd(PMImpl.java:2572) at com.objectdb.o.ENT.Z(ENT.java:1177)
If you need more explanation, please let me know. The test isn't pretty code as I tried to get only the things to expose the issue, nothing else..
Could be a mac thing? Unfortunately I don't have a PC on hand to test with.
Thanks
ObjectDB Version: 2.2.8
OS: OSX 10.6.8
JVM:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)