How to disable JAXWS / JBossWS in JBoss EAP 7 / 6
Issue
- What would we need to do to disable JBossWS to just use the Metro jars in JBoss EAP 6?
- I want to slim my JBoss installation to the minimum. How do I remove the web services subsystem?
- We added exclusion of webservices to
jboss-deployment-structure.xml
. Additionally, we commented<extension module="org.jboss.as.webservices"/>
and<subsystem xmlns="urn:jboss:domain:webservices:1.2">
in standalone-full.xml - We get the below exception when trying to invoke the serivce:
Caused by: java.lang.ClassCastException: class org.apache.cxf.jaxb.JAXBDataBinding
at java.lang.Class.asSubclass(Class.java:3126)
at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:269)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getJAXBClass(ReflectionServiceFactoryBean.java:243)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createDefaultDataBinding(ReflectionServiceFactoryBean.java:223)
- How to exclude the Apache CXF that EAP provides and use the CXF included in the application?
- How to override the JBoss WS Apache CXF that is included in JBoss EAP and have the application use the JAXWS implementation that is packaged in the application?
- Our application is failing with this ERROR :
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."webservices.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."webservices.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "webservices.war"
...
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYWS0059: Apache CXF library (cxf-rt-bindings-xml-2.7.3.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 Jakarta EE and any JBossWS specific functionality to be disabled.
at org.jboss.as.webservices.deployers.WSLibraryFilterProcessor.deploy(WSLibraryFilterProcessor.java:75)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.