Java 8 Enhancer Problem



I am currently migrating my project to Java 8. I'm using Spring and AspectJ load time weaving. Unluckily the LTW option of Spring is global. If it's enabled it also tries to find other class transformers on the classpath. This is normaly not a problem because the ObjectDB enhancer ignores non @Entity or already enhanced classes but in conjunction with new Java 8 class files it throws an exception which causes Spring to stop weaving. 

Caused by: com.objectdb.o.InternalException
at com.objectdb.o.InternalException.f(
at com.objectdb.o.JCP.p(
at com.objectdb.o.JCP.k(
at com.objectdb.o.JCE.<init>(
at com.objectdb.o.JCP.<init>(
at com.objectdb.o.JCL.F(
at com.objectdb.o.JCL.<init>(
at com.objectdb.JEnhancerAgent.transform(
at org.springframework.orm.jpa.persistenceunit.ClassFileTransformerAdapter.transform(
... 98 more

I don't use any of the new Java 8 features in my entity classes. So the hotfix would be pretty easy. Just catch the exception and output a log message like "Java 8 weaving currently not supported." instead.




Thank you for this report. Please check if  build 2.5.5_01 fixes this issue.

ObjectDB Support

Build 2.5.5_01 fixes this issue but it has a new bug. When I fetch, detach, change and merge an object I get the following exception:

Caused by: com.objectdb.o._IllegalArgumentException: Specified object is not an entity object
at com.objectdb.o._IllegalArgumentException.b(
at com.objectdb.o.JPE.g(
at com.objectdb.o.ERR.f(
at com.objectdb.o.OBC.onObjectDBError(
at com.objectdb.jpa.EMImpl.merge(

Inserting new objects works. Also merging ones created after the update to 2.5.5_01.


The new error is not related to the Enhancer fix, but to another fix (issue #1373).

Please try build 2.5.5_02.


ObjectDB Support