File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss and the fly likes Having trouble using my version of Hibernate instead of JBoss' in a JAR application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "Having trouble using my version of Hibernate instead of JBoss Watch "Having trouble using my version of Hibernate instead of JBoss New topic
Author

Having trouble using my version of Hibernate instead of JBoss' in a JAR application

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 434
Hi,

I'm trying to deploy a JAR file to JBoss 4.2.2.GA (don't have control over the server version). Our application uses Hibernate 4.0.1.Final, which we include through Maven like so ...



I also have a jboss-app.xml file to tell JBoss to use our files instead of its own ...



However, when I deploy our JAR file to JBoss, we get errors indicating that JBoss is using its own Hibernate 3 classes (e.g. "org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="com.mainco.fdr.lycea.model.UserRole"/>"). The structure of the JAR is like so

META-INF/jboss-app.xml
...
org/hibernate/cfg/Configuration.class
...

Any ideas how we can tell JBoss to use our Hibernate over its Hibernate?

Thanks, - Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Having trouble using my version of Hibernate instead of JBoss' in a JAR application
 
Similar Threads
java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider
Spring3 + JPA 2 + JBoss 6
Error slf4j-api, I can't exclude slf4j-api for Jboss
Horrendous EL problem
Could not resolve dependencies for maven project