Monday, May 15, 2017

Apache CXF library detected in ws endpoint deployment

Leave a Comment

I am trying to deploy my WAR app in Wildfly 10.0.0, and I am running into a common issue :

"{\"WFLYCTL0080: Failed services\" =>  {\"jboss.deployment.unit.\\\"my-app-ws.war\\\".PARSE\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"my-app.war\\\" .PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment \\\"my-app.war\\\"   Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:    WFLYWS0059: Apache CXF library (cxf-core-3.1.4.jar) detected in ws endpoint deployment;    either provide a proper deployment replacing embedded libraries with container    module dependencies or disable the webservices subsystem for the current deployment adding    a proper jboss-deployment-structure.xml descriptor to it. The former approach is    recommended, as the latter approach causes most of the webservices Java EE and any JBossWS    specific functionality to be disabled.\"}}" 

Then again I tried to make the CXF dependencies scope provided:

    <dependency>         <groupId>org.apache.cxf</groupId>         <artifactId>cxf-rt-transports-http</artifactId>         <version>3.1.4</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupId>org.apache.cxf</groupId>         <artifactId>cxf-rt-frontend-jaxws</artifactId>         <version>3.1.4</version>         <scope>provided</scope>     </dependency> 

Then I've tried to deploy the WAR archive again, but I run into another problem:

"{\"WFLYCTL0080: Failed services\" => {\"jboss.deployment.unit.\\\"my-app-ws.war\\\".POST_MODULE\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"my-app-ws.war\\\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \\\"my-app-ws.war\\\"   Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:    java.lang.ClassNotFoundException:    org.apache.cxf.transport.servlet.CXFServlet from [Module \\\"deployment.my-app-ws.war:main\\\"    from Service Module Loader]   Caused by: java.lang.ClassNotFoundException:    org.apache.cxf.transport.servlet.CXFServlet from [Module \\\"deployment.my-app-ws.war:main\\\"    from Service Module Loader]\"}}" 

How can I workaround this issue ?

1 Answers

Answers 1

You can use Java EE standard JAX-WS (JBoss uses Apache CXF for implementation of JAX-WS), or disable JBoss's webservice subsystem: https://developer.jboss.org/thread/221654 (if you really need to, but be aware if there are other applications that rely on this)

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment