NoClassDefFoundError at JAX-WS webservice deployment
----------------------------------------------------
Key: WFLY-5052
URL:
https://issues.jboss.org/browse/WFLY-5052
Project: WildFly
Issue Type: Bug
Components: Web Services
Affects Versions: 9.0.1.Final
Reporter: Gregory Lardiere
Assignee: Alessio Soldano
Fix For: 10.0.0.Beta1
Attachments: SampleWS.war, SampleWS.zip
The exception *java.lang.NoClassDefFoundError:
org/apache/ws/commons/schema/XmlSchemaAllMember* is thrown when deploying a JAX-WS
webservice :
{code}
2015-08-04 16:32:18,222 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5)
MSC000001: Failed to start service jboss.deployment.unit."SampleWS.war".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."SampleWS.war".INSTALL: WFLYSRV0153: Failed to process
phase INSTALL of deployment "SampleWS.war"
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.lang.NoClassDefFoundError:
org/apache/ws/commons/schema/XmlSchemaAllMember
at
org.apache.cxf.common.xmlschema.SchemaCollection.addCrossImports(SchemaCollection.java:315)
at
org.apache.cxf.common.xmlschema.SchemaCollection.addCrossImportsType(SchemaCollection.java:307)
at
org.apache.cxf.common.xmlschema.SchemaCollection.addOneSchemaCrossImports(SchemaCollection.java:252)
at
org.apache.cxf.common.xmlschema.SchemaCollection.addCrossImports(SchemaCollection.java:236)
at
org.apache.cxf.jaxb.JAXBSchemaInitializer.buildExceptionType(JAXBSchemaInitializer.java:605)
at
org.apache.cxf.jaxb.JAXBSchemaInitializer.checkForExistence(JAXBSchemaInitializer.java:326)
at org.apache.cxf.jaxb.JAXBSchemaInitializer.begin(JAXBSchemaInitializer.java:150)
at
org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:120)
at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:403)
at
org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:467)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:712)
at
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:527)
at
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:79)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539)
at
org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:119)
at
org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:120)
at
org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)
at
org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
Caused by: java.lang.ClassNotFoundException:
org.apache.ws.commons.schema.XmlSchemaAllMember from [Module
"org.apache.cxf:main" from local module loader @14899482 (finder: local module
finder @21588809 (roots:
/tmp/wildfly-9.0.1.Final/modules,/tmp/wildfly-9.0.1.Final/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
... 34 more
{code}
Replacing xmlschema-core-2.0.2.jar with xmlschema-core-2.2.1.jar fixes this problem.