Enhancer problem


During development, I have used the enhancer API in a static block in the code that creates the EntityManagerFactory, ie.

// .. more lines for each package

// connect to ObjectDB database
emf = Persistence.createEntityManagerFactory(...);

This has worked fine, and always enhances all of my classes.

I am now getting ready for production deployment and I am trying to integrate the Enhancer into my build process. I get many messages similar to:

[ObjectDB 2.2.9_06] Invalid class file format for type 'com.fastmodel.fastplan.entities.UserSettings' (error 422)

I am using the same objectdb.jar and the same JDK (win x64, 1.6.0_26).

What could this mean?



Could you check the log file for detailed stack traces?

Please provide more details about how you integrate the Enhancer into the build process.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)


The logs had the answer. I didn't have all of the classes that my entities required for loading. You might want to print these exceptions directly to system.out.

2011-09-02 06:37:46 #1 tools.enhancer]
com.objectdb.o.UserException: Invalid class file format for type 'com.fastmodel.fastplan.entities.UserSettings'
at com.objectdb.o.MSG.d(MSG.java:74)
at com.objectdb.o.JEL.A(JEL.java:442)
at com.objectdb.o.JEN.k(JEN.java:92)
at com.objectdb.Enhancer.main(Enhancer.java:32)
Caused by: java.lang.NoClassDefFoundError: org/zkoss/zul/Window




Yes, a better error message is required. Thanks for the update.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login