ObjectDB ObjectDB

Enhancer problem

#1

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

com.objectdb.Enhancer.enhance("com.fastmodel.fastplan.entities.*");
com.objectdb.Enhancer.enhance("com.fastmodel.fastplan.entities.comm.*");
com.objectdb.Enhancer.enhance("com.fastmodel.fastplan.entities.drills.*");
// .. 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?

Thanks

edit
delete
#2

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
edit
delete
#3

Thanks,

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

...

Thanks!

edit
delete
#4

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

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.