4 Replies Latest reply on Jun 6, 2015 11:59 AM by Kevin Hooke

    java.lang.NoSuchMethodException when deploying a web service in 8.1.0CR1

    Pascal Paradis-Théberge Newbie

      I'm having an issue with Wildfly and a packaged library in an ear file. The conditions for the error are:

      - the library is present (it doesn't even have to be used)

      - the application has one web service

       

      Everything works fine with jboss6 or jboss7 but with wildfly 8, the error happens sometimes (mostly on redeploy, deploying seems ok) and with wildfly 8.1.0CR1, it happens consistently, it doesn't seem possible to deploy the application.

       

      The problem seems to be that Wildfly is using the jar for its internal work when deploying the web service instead of its own version of the package but shouldn't this kind of package clash be prevented by the application server?

       

      This is happening with a publicly available library from Intuit so it's not a problem to share it here.I created a minimal test case, I'm attaching the ear file and the project I'm using to package it.

       

      Also, this is the exception:

       

      ESC[0mESC[0m07:59:49,941 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-15) Creating Service {http://test/}HelloService from class test.Hello

      ESC[0mESC[31m07:59:49,988 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-15) MSC000001: Failed to start service jboss.deployment.subunit."test.ear"."test.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."test.ear"."test.war".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "test.war" of deployment "test.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]

      Caused by: javax.xml.ws.WebServiceException: java.lang.reflect.UndeclaredThrowableException

              at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371)

              at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:66)

              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:117)

              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:137)

              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:69)

              at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:75)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.CR1.jar:8.1.0.CR1]

              ... 5 more

      Caused by: java.lang.reflect.UndeclaredThrowableException

              at com.sun.proxy.$Proxy25.visitLabel(Unknown Source)

              at org.apache.cxf.jaxws.WrapperClassGenerator.createWrapperClass(WrapperClassGenerator.java:213)

              at org.apache.cxf.jaxws.WrapperClassGenerator.generate(WrapperClassGenerator.java:122)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.generatedWrapperBeanClass(JaxWsServiceFactoryBean.java:683)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:653)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:484)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:704)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:550)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265)

              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)

              ... 13 more

      Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)

              at java.lang.Class.getMethod(Class.java:1665) [rt.jar:1.7.0_55]

              at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)

              ... 28 more

       

      Can someone take a look? Help me with this?