5 Replies Latest reply on Mar 11, 2014 11:29 AM by Andrig Miller

    WildFly 8, JPA 2.1: HowTo?

    Frank Langelage Master

      After upgrading to latest sources including the update to JPA 2.1 I get this error:

      {code}

      23:43:07,068 INFO  [org.jboss.as.jpa#parse] JBAS011401: Read persistence.xml for maj2e-langfr-dev

      23:43:10,470 ERROR [org.jboss.msc.service.fail#startFailed] MSC000001: Failed to start service jboss.deployment.subunit."maj2e-langfr-dev.ear"."ejb-entity.jar".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."maj2e-langfr-dev.ear"."ejb-entity.jar".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of subdeployment "ejb-entity.jar" of deployment "maj2e-langfr-dev.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1974) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1907) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011434: Persistence provider module load error org.hibernate:4.1 (class org.hibernate.ejb.HibernatePersistence)

              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:629)

              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deployPersistenceUnit(PersistenceUnitServiceHandler.java:309)

              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:270)

              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleJarDeployment(PersistenceUnitServiceHandler.java:147)

              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:122)

              at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:46)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]

              ... 5 more

      Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate:4.1

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:224) [jboss-modules.jar:1.2.0.Final]

              at org.jboss.as.jpa.persistenceprovider.PersistenceProviderLoader.loadProviderModuleByName(PersistenceProviderLoader.java:60)

              at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:626)

              ... 11 more

       

      23:43:10,506 ERROR [org.jboss.as.controller.management-operation#executeStep] JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "maj2e-langfr-dev.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"maj2e-langfr-dev.ear\".\"ejb-entity.jar\".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"maj2e-langfr-dev.ear\".\"ejb-entity.jar\".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of subdeployment \"ejb-entity.jar\" of deployment \"maj2e-langfr-dev.ear\"

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011434: Persistence provider module load error org.hibernate:4.1 (class org.hibernate.ejb.HibernatePersistence)

          Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate:4.1"}}

      23:43:10,516 ERROR [org.jboss.as.server#handleResult] JBAS015870: Deploy of deployment "maj2e-langfr-dev.ear" was rolled back with the following failure message:

      {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"maj2e-langfr-dev.ear\".\"ejb-entity.jar\".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"maj2e-langfr-dev.ear\".\"ejb-entity.jar\".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of subdeployment \"ejb-entity.jar\" of deployment \"maj2e-langfr-dev.ear\"

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011434: Persistence provider module load error org.hibernate:4.1 (class org.hibernate.ejb.HibernatePersistence)

          Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate:4.1"}}

      {code}

      I already updated my pesistence.xml to

       

      {code:xml}

      <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"

              version="2.1">

      </persistence>

      {code:xml}

      but this did not help.

       

      What am I missing?