1

我正在部署一场在 tomcat 上运行良好的战争,但我无法在 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
4

1 回答 1

0

当您添加的库使用 asm.jar 时,会出现此问题。JBoss 有它自己的 asm.jar %JBOSS_HOME%\system\layers\base\asm\asm\main,这可能会导致与其他包含的版本发生冲突。我注意到您通常可以使用 JBoss 重新开始,但是如果部署了包含多个 asm-jar 的 war/jar,则重新部署新的 war 或 ear 文件将失败。

解决方案是找出您的哪些库使用 asm.jar,然后将其排除。如果你使用 Maven,你可以在你的 pom 中添加这样的东西:

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

或者,您可以在 jboss-deployment-structure.xml 中排除 asm.jar

更多信息也在这里:https ://developer.jboss.org/message/823745

于 2016-10-07T08:18:29.657 回答