Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss 7.1.1.Final: how to exclude Hibernate 4 and use the version packaged in the application ?

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,





My web application (WAR file) already contains Hibernate :



WEB-INF\lib\hibernate-jpa-2.0-api-1.0.1.Final.jar

WEB-INF\lib\hibernate-entitymanager-3.6.5.Final.jar

WEB-INF\lib\hibernate-core-3.3.0.SP1.jar

WEB-INF\lib\hibernate-commons-annotations-3.1.0.GA.jar

WEB-INF\lib\hibernate-annotations-3.4.0.GA.jar



I do not want JBoss 7.1.1.Final to load its version which is located in the folder jboss-as-7.1.1.Final\modules\org\hibernate\main



I already know that i need to add the following line to the persistence.xml file :


(as mentioned in https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide).



I get the following error when i try to deploy the WAR file :


Any idea ? something to do with Infinispan apparently. Can i turn it off ? If yes, where ?

Thanks in advance for helping.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to create a jboss-deployment-structure.xml file in the root META-INF of your webapp.

Then tell it to exclude loading the hibernate module.



WP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic