Deployment failed on Wildfly 9

Paullo

I once had this issue with wildfly 8 but was solved include eclipselink.jar in $WILDFLY_HOME/modules/system/layers/base/org/eclipse/persistence/main and updating the module.xml with the resource root

<resource-root path="eclipselink.jar" />

and including on my ejb module's POM.xml

    <dependency>  
        <groupId>org.eclipse.persistence</groupId>  
        <artifactId>eclipselink</artifactId>  
        <version>2.6.0</version>  
        <scope>provided</scope>  
    </dependency>  

This works fine in Wildfly 8.*. Unfortunately employing the same technic for Wildfly 9CR1 has consistently failed the with log below:

08:52:31,028 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."rga-ear-1.0.ear".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."rga-ear-1.0.ear".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "rga-ear-1.0.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:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
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:998)
    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
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:2658)
    at java.lang.Class.getConstructor0(Class.java:2964)
    at java.lang.Class.newInstance(Class.java:403)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 13 more

08:52:31,195 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "rga-ear-1.0.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"rga-ear-1.0.ear\".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"rga-ear-1.0.ear\".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"rga-ear-1.0.ear\"
    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"}}

I have also tried removing the

<resource-root path="eclipselink.jar" />
eclipselink.jar

But get a different error Persistence Provider Not Found. Could this be a Wildfly bug or there's something I am not doing right?

esmin

Had the same issue, and resolved using wf9 docs: wildlfy 9 eclipselink

basically, instead <resource-root path="eclipselink.jar" />

place this

<resource-root path="eclipselink.jar">
        <filter>
                <exclude path="javax/**" />
        </filter>
        </resource-root>

By the way, I'm using eclipslink 2.5.2

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

WildFly - How To View Deployment

From Dev

Archiva deployment on wildfly 10

From Dev

error servlet deployment with Wildfly

From Dev

error servlet deployment with Wildfly

From Dev

JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

From Dev

JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

From Dev

Starting wildfly 9 with eclipselink

From Dev

Eclipse Luna + WildFly 9

From Dev

Eclipse Luna + WildFly 9

From Dev

Wildfly DefaultJMSConnectionFactory is missing on WAR deployment

From Dev

adding jars as deployment in WildFly 10

From Dev

Wildfly DefaultJMSConnectionFactory is missing on WAR deployment

From Dev

MAAS "Failed deployment" on HP proliant DL380 G9

From Dev

Hibernate Search starts with Wildfly 9 but not Wildfly 10

From Dev

Redeploy failed git deployment

From Dev

Blackberry Deployment Failed Error

From Dev

Deployment failed, Internal error

From Dev

Deployment failed on Tomcat

From Dev

Deployment failed on Tomcat

From Dev

Deployment of application to device failed

From Dev

Blackberry Deployment Failed Error

From Dev

Redeploy failed git deployment

From Dev

UWP deployment failed with CodenameOne

From Dev

Xamarin Forms Deployment failed

From Dev

JBoss Wildfly 9, JNDI exception

From Dev

Wildfly 9 Load-Balancing

From Dev

JASPIC Wildfly 9 validateRequest with session

From Dev

Wildfly 9 Load-Balancing

From Dev

Constructor injection with wildfly 9 not working