title: Wildfly 21 with eclipselink 3.0 getting error as Persistence Provider not found
body: <p>Wildfly Version: 21.0.2.Final
  <br>JDK Version: openjdk-11.0.2
  <br>Eclipselink: Migrating from 2.7.8 to 3.0.0 ( <strong>2.7.8 working fine</strong>)
  <br>When I try to deploy EJB 3.2 (JPA 2.2) project I am getting the below issue</p>
  <pre><code>10:29:59,261 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit.&quot;AAA-EAR.ear&quot;.FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit.&quot;AAA-EAR.ear&quot;.FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment &quot;AAA-EAR.ear&quot;
      at org.jboss.as.server@13.0.3.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
      at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
      at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
      at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
      at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
      at java.base/java.lang.Thread.run(Thread.java:834)
  Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider 'org.eclipse.persistence.jpa.PersistenceProvider' not found
      at org.jboss.as.jpa@21.0.2.Final//org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:1001)
      at org.jboss.as.jpa@21.0.2.Final//org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.nextPhaseDependsOnPersistenceUnit(PersistenceUnitServiceHandler.java:1044)
      at org.jboss.as.jpa@21.0.2.Final//org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:137)
      at org.jboss.as.jpa@21.0.2.Final//org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
      at org.jboss.as.server@13.0.3.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
      ... 8 more
  </code></pre>
  <p>Eclipselink 2.7.8 working fine, so I just updated eclipselink version to 3.0 in below module.xml.
  Also I think no need to exclude javax as this folder does not in eclipselink 3.0 jar.</p>
  <p>wildfly-21.0.2.Final/modules/system/layers/base/org/eclipse/persistence/main/module.xml</p>
  <pre><code>&lt;module name=&quot;org.eclipse.persistence&quot; xmlns=&quot;urn:jboss:module:1.5&quot;&gt;
      &lt;properties&gt;
          &lt;property name=&quot;jboss.api&quot; value=&quot;public&quot;/&gt;
      &lt;/properties&gt;
  
      &lt;resources&gt;
          &lt;resource-root path=&quot;jipijapa-eclipselink-21.0.2.Final.jar&quot;/&gt;
      &lt;resource-root path=&quot;eclipselink-3.0.0.jar&quot;&gt;
            &lt;filter&gt;
               &lt;exclude path=&quot;javax/**&quot; /&gt;
            &lt;/filter&gt;
         &lt;/resource-root&gt;
      &lt;/resources&gt;
  
      &lt;dependencies&gt;
          &lt;module name=&quot;javax.api&quot;/&gt;
          &lt;module name=&quot;javax.annotation.api&quot;/&gt;
          &lt;module name=&quot;javax.enterprise.api&quot;/&gt;
          &lt;module name=&quot;javax.persistence.api&quot;/&gt;
          &lt;module name=&quot;javax.transaction.api&quot;/&gt;
          &lt;module name=&quot;javax.validation.api&quot;/&gt;
          &lt;module name=&quot;javax.xml.bind.api&quot;/&gt;
          &lt;module name=&quot;org.antlr&quot;/&gt;
          &lt;module name=&quot;org.dom4j&quot;/&gt;
          &lt;module name=&quot;org.jboss.as.jpa.spi&quot;/&gt;
          &lt;module name=&quot;org.jboss.logging&quot;/&gt;
          &lt;module name=&quot;org.jboss.vfs&quot;/&gt;
      &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  <p>Below is my META-INF/persistence.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;persistence version=&quot;2.0&quot; xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd&quot;&gt;
    &lt;persistence-unit name=&quot;AAA-EJB&quot;  transaction-type=&quot;JTA&quot;&gt;
      &lt;provider&gt;**org.eclipse.persistence.jpa.PersistenceProvider**&lt;/provider&gt;
      &lt;jta-data-source&gt;java:/Test&lt;/jta-data-source&gt;
      &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
      &lt;properties&gt;
         &lt;property name=&quot;eclipselink.jpa.uppercase-column-names&quot; value=&quot;true&quot;/&gt;
         &lt;property name=&quot;eclipselink.query-results-cache&quot; value=&quot;false&quot;/&gt;
         &lt;property name=&quot;eclipselink.refresh&quot; value=&quot;true&quot;/&gt;
         &lt;property name=&quot;eclipselink.cache.shared.default&quot; value=&quot;false&quot;/&gt;
         &lt;property name=&quot;eclipselink.deploy-on-startup&quot; value=&quot;true&quot; /&gt;
      &lt;/properties&gt; 
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  
  </code></pre>
  <p>Eclipselink 2.7.8 working fine but getting issue for Eclipselink 3.0.
  <br>Please help. Thanks.</p>