2 Replies Latest reply on Sep 12, 2014 4:16 AM by Seb Alkhan

    EclipseLink PersistenceProvider not found

    Seb Alkhan Newbie

      i have installed wildfly 8 and because i have already a project configured to use EclipseLink, i have tried to configure wildfly to use it.

      However, i always the same error :

           at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
           at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
           at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
           at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
      Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider '
        org.eclipse.persistence.jpa.PersistenceProvider
        '
      not found
           at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:990)
           at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:258)
           at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleWarDeployment(PersistenceUnitServiceHandler.java:191)
           at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:126)
           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.1.0.Final.jar:8.1.0.Final]
           ... 5 more

      I have though followed instructions of the official documentation, but nothing changed !

       

      Do you know what is the problem ?

       

      Tks

        • 1. Re: EclipseLink PersistenceProvider not found
          Scott Marlow Master

          Hibernate is better, just use it!  :-)

           

          For EclipseLink, you could show us the contents of your modules/system/layers/base/org/eclipse/persistence/main/ folder and also the contents of the module.xml file (in that folder).

           

          Perhaps you are missing a file name in the module.xml or have a jar file name spelled incorrectly.

           

          Also. did you set the system property "eclipselink.archive.factory"?

          • 2. Re: EclipseLink PersistenceProvider not found
            Seb Alkhan Newbie

            Finally I solved the problem!

            in fact, I have a composite unit, all persistence.xml are correct, but the persistence.xml which declared the composite unit was a bad statement of the provider:

                 <provider>

                      org.eclipse.persistence.jpa.PersistenceProvider

                 </provider>

            replaced by :

                <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

             

            Use Hibernate why not! But when I use it, I have an error with db2 database :

             

            at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]

                at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]

                at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]

                at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)

                at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]

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

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

                at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122)

            Caused by: java.lang.NullPointerException

                at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:244) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]

                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]

                at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]

                at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]

                ... 8 more

             

            if i use eclipseLink i have not this error ..... Hibernate is better but it is not work in this case !

            I tried to add dialect in my persistence.xml, but no change !

             

            Tks