Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5052

NoClassDefFoundError at JAX-WS webservice deployment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 10.0.0.Beta1
    • 9.0.1.Final
    • Web Services
    • None
    • Hide

      Download the file attached (SampleWS.zip)
      Compile the project to a WAR file
      Deploy the WAR file in WildFly 9.0.1
      Start WildFly, the exception is printed on the screen.

      Replace xmlschema-core-2.0.2.jar with xmlschema-core-2.2.1.jar
      Restart WildFly
      It works fine

      Show
      Download the file attached (SampleWS.zip) Compile the project to a WAR file Deploy the WAR file in WildFly 9.0.1 Start WildFly, the exception is printed on the screen. Replace xmlschema-core-2.0.2.jar with xmlschema-core-2.2.1.jar Restart WildFly It works fine

      The exception java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchemaAllMember is thrown when deploying a JAX-WS webservice :

      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
      

      Replacing xmlschema-core-2.0.2.jar with xmlschema-core-2.2.1.jar fixes this problem.

        1. SampleWS.war
          5 kB
        2. SampleWS.zip
          4 kB

              rhn-support-asoldano Alessio Soldano
              gregory.lardiere Gregory Lardiere (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: