Problem with PersistenceProvider
bajrang_asthana Jul 4, 2012 8:09 AMHi All,
I am facing issues while deploying the .ear file in JBoss 7.1 regarding PersistenceProvider.
I am getting below error-
6:28:58,198 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."protectoria.ear"."app.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."protectoria.ear"."app.jar".INSTALL: Failed to process phase INSTALL of subdeployment "app.jar" of deployment "protectoria.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_21]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]
Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider '
org.hibernate.ejb.HibernatePersistence
' not found
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:555)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:295)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:145)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:120)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
The solution which I have tried-
1. I have added module dependency in jboss-deployment-structure.xml and copied the hibernate-all.jar in jboss-as-7.1.1.Final\modules\org\hibernate\main -
<dependencies>
<module name="javax.faces.api" slot="1.2" export="true" />
<module name="com.sun.jsf-impl" slot="1.2" export="true" />
<module name="org.hibernate" export="true" />
</dependencies>
2. I have also added the hibernate-all.jar in Ear lib directly or by the resource tag in jboss-deployment-structure.xml-
<resources>
<resource-root path="hibernate-all.jar" />
</resources>
But nothing is working. Please suggest.