2 Replies Latest reply on Aug 29, 2015 5:17 PM by john gregory

    wildfly9.0.1 ear deployment

    john gregory Newbie

      I'm getting an error when deploying an ear to wildfly 9.0.1.  In looking at persistence.xml files, all the ones I've found use that particular PersistenceProviderImpl

      for openjpa.  Below is the stack trace...

       

       

      22:20:32,134 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."jjgrego-ear.ear".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jjgrego-ear.ear".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "jjgrego-ear.ear"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: java.util.ServiceConfigurationError: javax.persistence.spi.PersistenceProvider: Provider org.apache.openjpa.persistence.PersistenceProviderImpl not a subtype

          at java.util.ServiceLoader.fail(ServiceLoader.java:231)

          at java.util.ServiceLoader.access$300(ServiceLoader.java:181)

          at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:369)

          at java.util.ServiceLoader$1.next(ServiceLoader.java:445)

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

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

          at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.nextPhaseDependsOnPersistenceUnit(PersistenceUnitServiceHandler.java:1046)

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

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

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)

          ... 5 more

       

      22:20:32,157 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "jjgrego-ear.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"jjgrego-ear.ear\".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jjgrego-ear.ear\".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"jjgrego-ear.ear\"

          Caused by: java.util.ServiceConfigurationError: javax.persistence.spi.PersistenceProvider: Provider org.apache.openjpa.persistence.PersistenceProviderImpl not a subtype"}}

       

      My persistence.xml looks like this:

      <persistence version="2.0"

          xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

       

          <persistence-unit name="greggoPU" transaction-type="JTA">

              <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>  

              <jta-data-source>java:jboss/greggoDS</jta-data-source>

       

              <class>jjgrego.ejb.businessObjects.Automobile</class>

              <class>jjgrego.ejb.businessObjects.CarMake</class>

       

              <exclude-unlisted-classes>false</exclude-unlisted-classes>

       

              <properties>

            

                  <!-- OpenJPA Properties -->

                  <property name="openjpa.DynamicEnhancementAgent"  value="false"                           />

                  <property name="openjpa.RuntimeUnenhancedClasses" value="supported"                       />

                  <property name="openjpa.Log"                      value="DefaultLevel=TRACE, Tool=INFO"   />

                  <property name="jboss.as.jpa.providerModule"      value="org.apache.openjpa"              />

                  <property name="openjpa.jdbc.DBDictionary"        value="mysql(UseClobs=true)"            />         

                  <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"   />

       

              </properties>

       

          </persistence-unit>

      </persistence>

       

      During a google search, I found a note about adding this property:           

      <property name="jboss.as.jpa.providerModule"      value="org.apache.openjpa"              />

      removing it doesn't change anything.  If anyone has any idea what may be causing the error, I'll take any suggestions.

      If you need any further info, pls don't hesitate to ask.

       

      John