Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic