1

I am deploying a war which runs fine on tomcat but I'm unable to deploy it on jboss.

18:05:26,638 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."mywebproject2.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."mywebproject2.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "mywebproject2.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_24]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_24]
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:129)
    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
    at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    ... 5 more
Caused by: java.lang.reflect.UndeclaredThrowableException
    at $Proxy21.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:672)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:642)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:484)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:693)
    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:204)
    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:1605) [rt.jar:1.6.0_24]
    at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
    ... 28 more

18:05:26,682 ERROR [org.jboss.as.server] (HttpManagementService-threads - 3) JBAS015870: Deploy of deployment "mywebproject2.war" was rolled back with the following failure message: 
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"mywebproject2.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"mywebproject2.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"mywebproject2.war\"
    Caused by: javax.xml.ws.WebServiceException: java.lang.reflect.UndeclaredThrowableException
    Caused by: java.lang.reflect.UndeclaredThrowableException
    Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)"}}
18:05:31,264 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment mywebproject2.war (runtime-name: mywebproject2.war) in 4582ms
THelper
  • 15,333
  • 6
  • 64
  • 104
prafulis007
  • 31
  • 1
  • 3
  • 1
    Please Format your question and tell us more. – Werner Henze Jan 09 '14 at 13:15
  • HI.. I am deploying a war which runs fine on tomcat but unable to deploy on jboss.. I am deploying on jboss for the first time and any help would be much appreciated.. – prafulis007 Jan 09 '14 at 14:07
  • With tell us more, I think that Werner means that you should mention the technologies you use, show the pom.xml if exists... Things like that – Iker Aguayo Jan 09 '14 at 15:00
  • 1
    Don't know if this works, but seems related, try it: http://stackoverflow.com/questions/28070208/error-when-deploying-java-ws-in-jboss-6-3-0-eap – Level15 Mar 17 '15 at 19:05

1 Answers1

0

This problem occurs when a library you've added uses the asm.jar. JBoss has it's own asm.jar located in %JBOSS_HOME%\system\layers\base\asm\asm\main and this can cause conflicts with other included versions. I've noticed that you usually can do a clean start with JBoss, but redeploying a new war or ear file will fail if an war/jar was deployed that contains multiple asm-jars.

The solution is to find out which of your libraries uses the asm.jar and then exclude it. If you use Maven you can added something like this to your pom:

<exclusions>
    <exclusion>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
    </exclusion>
</exclusions>

Alternatively you can exclude the asm.jar in your jboss-deployment-structure.xml

More information also here: https://developer.jboss.org/message/823745

THelper
  • 15,333
  • 6
  • 64
  • 104