Reputation: 21
I am facing an issue deploying a web application into WebLogic server 12c. Web application has a dependency on a service jar ( which internally has a dependency on hibernate classes). When I am building the war its not including the hibernate-entitymanager.jar in the WEB-INF/lib/ folder of web application and its deployment is failing with exception "ClassNotFoundException org.hibernate.ejb.HibernatePersistence".
I can add missing hibernate jar details into web application pom. But if i doing I am ending up adding all of the hibernate related jars into web application which is not recommended.
Is there any other way that i can make those jars available to the application when it runs ?
Upvotes: 0
Views: 1236
Reputation: 21
All
I resolved it by adding dependency to the pom ie hibernate-entitymanager and then updated weblogic.xml with below details
<wls:prefer-application-packages>
<wls:package-name>org.hibernate</wls:package-name>
</wls:prefer-application-packages>
Upvotes: 0