Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildfly deploy org.eclipse.persistence.jpa.PersistenceProvider could not be instantiated #17

Open
vicenthy opened this issue Sep 8, 2017 · 2 comments

Comments

@vicenthy
Copy link

vicenthy commented Sep 8, 2017

I have problems to run the aplication in eclipse and wildfly 9 ou 10.x

my module.xml

`

<resources>
    <resource-root path="jipijapa-eclipselink-10.1.0.Final.jar"/>
    <resource-root path="eclipselink-2.6.1.jar">
   <!--     <filter>
          <exclude path="javax/**" />
       </filter> -->
    </resource-root>
</resources>

<dependencies>
    <module name="asm.asm"/>
    <module name="javax.api"/>
    <module name="javax.annotation.api"/>
    <module name="javax.enterprise.api"/>
    <module name="javax.persistence.api"/>
    <module name="javax.transaction.api"/>
    <module name="javax.validation.api"/>
    <module name="javax.xml.bind.api"/>
    <module name="org.antlr"/>
    <module name="org.dom4j"/>
    <module name="org.javassist"/>
    <module name="org.jboss.as.jpa.spi"/>
    <module name="org.jboss.logging"/>
    <module name="org.jboss.vfs"/>
</dependencies>
`

Stacktrace Erro:

(MSC service thread 1-6) WFLYJPA0002: Read persistence.xml for CasaERP_PU
17:16:40,155 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "erp-1.0.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.ServiceConfigurationError: javax.persistence.spi.PersistenceProvider: Provider org.eclipse.persistence.jpa.PersistenceProvider could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.jboss.as.jpa.persistenceprovider.PersistenceProviderLoader.loadProviderModuleByName(PersistenceProviderLoader.java:70)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:1000)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:270)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleWarDeployment(PersistenceUnitServiceHandler.java:203)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:131)
at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.eclipse.persistence.jpa.PersistenceProvider.getProviderUtil()Ljavax/persistence/spi/ProviderUtil;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/eclipse/persistence/jpa/PersistenceProvider, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/persistence/spi/PersistenceProvider have different Class objects for the type javax/persistence/spi/ProviderUtil used in the signature
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 14 more

17:16:40,160 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "erp-1.0.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "erp-1.0.war"
Caused by: java.util.ServiceConfigurationError: javax.persistence.spi.PersistenceProvider: Provider org.eclipse.persistence.jpa.PersistenceProvider could not be instantiated
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.eclipse.persistence.jpa.PersistenceProvider.getProviderUtil()Ljavax/persistence/spi/ProviderUtil;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/eclipse/persistence/jpa/PersistenceProvider, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/persistence/spi/PersistenceProvider have different Class objects for the type javax/persistence/spi/ProviderUtil used in the signature"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
17:16:40,218 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "mysql-connector-java-5.1.23-bin.jar" (runtime-name : "mysql-connector-java-5.1.23-bin.jar")
17:16:40,219 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "erp-1.0.war" (runtime-name : "erp-1.0.war")
17:16:40,222 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."erp-1.0.war".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "erp-1.0.war"

@alexandrenilton
Copy link

You've removed the filter tag.. You should preserve it. Like this:

** **

I'm running this same application in wildfly 10.1.0 Final and using Eclipse Neon as IDE.
If you have any question you can find me in facebook: alexandrenilton
I'm brazilian so, if you speak portuguese, english or frech I can help you.
Bye!

@dosindi
Copy link

dosindi commented Mar 3, 2018

interesting solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants