Need help to configure webservices by disabling JBossWs
rishikesh.dalvi Dec 18, 2016 2:29 PMI am migrating my application from weblogic to WildFly10. I have application specific webservice working in weblogic. Same i am trying to make use of in WildFly. However i am facing issues while deploying application. Error details are as follows
ISSUE LOG :
\"jboss.undertow.deployment.default-server.default-host./pbmWS\" => \"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./pbmWS: java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/rcWebServiceContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxws]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/jaxws/spring/EndpointDefinitionParser$SpringEndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): Failed to link org/apache/cxf/jaxws/EndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): javax/xml/ws/Endpoint
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/rcWebServiceContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxws]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/jaxws/spring/EndpointDefinitionParser$SpringEndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): Failed to link org/apache/cxf/jaxws/EndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): javax/xml/ws/Endpoint
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/rcWebServiceContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxws]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/jaxws/spring/EndpointDefinitionParser$SpringEndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): Failed to link org/apache/cxf/jaxws/EndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): javax/xml/ws/Endpoint
Caused by: org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxws]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/jaxws/spring/EndpointDefinitionParser$SpringEndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): Failed to link org/apache/cxf/jaxws/EndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): javax/xml/ws/Endpoint
Caused by: java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/jaxws/spring/EndpointDefinitionParser$SpringEndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): Failed to link org/apache/cxf/jaxws/EndpointImpl (Module \\\"deployment.ZL_name.ear:main\\\" from Service Module Loader): javax/xml/ws/Endpoint\"
jboss-deployment-structure.xml:
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<exclude-subsystems>
<subsystem name="webservices" />
<subsystem name="jaxrs" />
<subsystem name="weld" />
</exclude-subsystems>
<!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</deployment>
</jboss-deployment-structure>
EAR Structure:
ZLName.ear
META-INF
jboss-deployment-structure.xml:
jboss-app.xml (lib path set to APP-INF/lib)
APP-INF
lib
rcWebService-D_RC_ZAAS.war
META-INF
added in manifest Dependencies: org.apache.cxf
WEB-INF
rcWebServiceContext.xml
rcWebServiceContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<!-- Load CXF modules from cxf.jar -->
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint
id="rcWebService"
implementor="com.zl.mirev.webservices.MiRevWebServiceImpl"
address="/checkEligibility" />
</beans>