Hi,
I was trying to deploy an application using JBoss 7.1.1 and that uses Persistance.
However, i keep getting the error: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.hibernate.jpa.HibernatePersistenceProvider' not found
After some amount of troubleshooting and research on forums, i found that the jar file: hibernate-entitymanager-4.0.1.Final.jar does not contain the jpa package itself.
The following hibernate jar files are present for JBoss 7.1.1 at path: <<JBoss_Home>>/modules/org/hibernate/main
hibernate-commons-annotations-4.0.1.Final.jar
hibernate-core-4.0.1.Final.jar
hibernate-entitymanager-4.0.1.Final.jar
hibernate-infinispan-4.0.1.Final.jar
However, the provider is present in the jar file: hibernate-entitymanager-4.3.5.Final.jar
I tried using the latest jar file in my pom.xml and excluded: 'org.hibernate' from the jboss deployment structure.
But, it lead to other complications:
- org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018037: Failed to process WEB-INF/lib: "/content/AdminConfig.war/WEB-INF/lib/hibernate-core-4.1.6.Final.jar"
WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015852: Could not index class org/dom4j/Document.class at /content/AdminConfig.war/WEB-INF/lib/dom4j-1.6.1.jar: java.util.zip.ZipException: invalid LOC header (bad signature)
----------------------------------------------------------------------------------------------------------------------------------------------------
Can someone help with suggesting a fix for the issue with JBoss 7.1.1?
Or if the correct dependencies in pom.xml and jboss-deployment-structure.xml can be provided?
As a workaround, the provider: org.hibernate.ejb.HibernatePersistence is being used. But, i want to use JPA provider to avoid any future issues due to depreciation.
Thanks,
Sheldon