2 Replies Latest reply on Mar 19, 2014 8:02 AM by Thomas Goettlich

    Deployment failed because of 'org.hibernate.jpa.HibernatePersistenceProvider' not found

    Thomas Goettlich Novice

      I just downloaded Wildfly 8.0.0.Final and tried to deploy our JBoss 7 ready application.

      However, I always get the following exception:

       

      14:48:03,987 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."myapp.ear".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp.ear".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of deployment "myapp.ear"
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
      Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.hibernate.jpa.HibernatePersistenceProvider' not found
              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:972)
              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:260)
              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleEarDeployment(PersistenceUnitServiceHandler.java:215)
              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:129)
              at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
              ... 5 more
      
      

       

      I found some information on the net, stating that in order to use Hibernate 4.3.0, it would be sufficient not to define any persistence provider in our persistence.xml.

      However, removing the provider element from persistence.xml or defining it as

      <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>

      doesn't make any difference.

       

      Is this a bug or am I missing something?

       

      P.S.:

       

      before you ask, this is the first error and the only warning preceding the error is the following (not sure if that's relevant)

      15:00:03,504 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.myapp.ear" is using a private module ("org.jboss.as.jpa:main") which may be changed or removed in future versions without notice.