-
15. EntityManager is an interface, and JAXB can't handle interfaces
samwun9988 Feb 4, 2011 6:35 PM (in response to nickarls)After removed all hibernate*.jar files from the WEB-INF/lib/ directory, I redeploy the war file.
Now it throws the following exception:
....
org.hibernate.cfg.ExtendedMappings: java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMappings has interface org.hibernate.cfg.Mappings as super class
....
I think I need the hibernate jar files which was built into my WEB-INF/lib/ folder.
After I removed it, the application tried to use those hibernate classes from Jboss, but it found the super class is changed or not matched .... that s why it complaining about.
Now , how to force my application use the hibernates in my applicaiton liberary (WEB-INF/lib/)?
Thanks
Sam
-
16. EntityManager is an interface, and JAXB can't handle interfaces
mp911de Feb 5, 2011 3:45 AM (in response to samwun9988)Hi Sam,
it seems, that there are some Hibernate Jars on your Class-Path, which are different in its versions. An java.lang.IncompatibleClassChangeError occours when you have made a change to a class and are still referencing it from an another class by its old signatures. Try deleting all class files and recompiling everything. Since Hibernate is 3rd-Party try to find all hibernate*jars in your JBoss directory (and subdirectories). If you find some differing Versions, you found the cause.
Best regards,
Mark
-
17. EntityManager is an interface, and JAXB can't handle interfaces
samwun9988 Feb 5, 2011 3:52 AM (in response to mp911de)Thanks Mark,
I will do that. I was about to abandon JBoss because of this error.
Thanks
Sam
-
18. EntityManager is an interface, and JAXB can't handle interfaces
samwun9988 Feb 5, 2011 3:56 AM (in response to samwun9988)Do you know where can I find all JBoss compatible Hibernate jar files?
Thanks
Sam
-
19. EntityManager is an interface, and JAXB can't handle interfaces
ilya40umov Feb 5, 2011 4:05 AM (in response to samwun9988)Hibernate jars are already inside Jboss server. You don't need to add some additional jars.
-
20. EntityManager is an interface, and JAXB can't handle interfaces
samwun9988 Feb 5, 2011 4:34 AM (in response to ilya40umov)How can I recompile my source code without referencing to Jboss's Hibernate libraries?
ref: in Eclipse and Netbeans..
Thanks
Sam
-
21. EntityManager is an interface, and JAXB can't handle interfaces
ilya40umov Feb 5, 2011 4:50 AM (in response to samwun9988)You just need to add the jars from Jboss to your Build Path. It depends on IDE but for example in Eclipse you can simply add Jboss Server Runtime Library to your project build path and that's all.
-
22. EntityManager is an interface, and JAXB can't handle interfaces
samwun9988 Feb 5, 2011 5:15 AM (in response to ilya40umov)I have tried to add Jboss 6. Final to Eclipse, but it doesn't support yet, and neither Netbeans 6.9.1
Can I add JBoss 6 libraries to the project? I found 2 libs floders in JBoss 6, one is at <JBoss6 Home>/, another is at <Jboss6 home>/server/all/.
Or should I add all them to the project?
Thanks
Sam
-
23. EntityManager is an interface, and JAXB can't handle interfaces
ilya40umov Feb 5, 2011 6:15 AM (in response to samwun9988)1) Take a look at this:
http://community.jboss.org/thread/148575
2) Try Jboss Tools
3) There should not be any harm if you add all the jars from the jboss to the classpath.