引起:java.lang.NoSuchMethodException:org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)

时间:2017-08-29 10:23:59

标签: hibernate soap jboss java-8 jboss7.x

我正在尝试将JAX-WS webservice部署到Jboss-7-eap中 JDK-1.8但低于错误。虽然我能够部署相同类型的其他Web服务模块。

15:25:46,350 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."brazil-standard-webservice.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."brazil-standard-webservice.war".INSTALL: WFLYSRV0153: Failed
to process phase INSTALL of deployment "brazil-standard-webservice.war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
        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: javax.xml.ws.WebServiceException: java.lang.reflect.UndeclaredThrowableException
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:375)
        at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:79)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543)
        at org.jboss.wsf.stack.cxf.configuration.BusHolder.configure(BusHolder.java:234)
        at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:97)
        at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:59)
        at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
        ... 5 more
Caused by: java.lang.reflect.UndeclaredThrowableException
        at com.sun.proxy.$Proxy29.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:675)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:645)
        at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:417)
        at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525)
        at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
        at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:460)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:338)
        ... 13 more
Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
        at java.lang.Class.getMethod(Class.java:1786)
        at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:85)
        ... 27 more

根据互联网的解决方案: 1)我通过排除在hibernate-3.2.6.ga jar中删除了asm和asm-aatrs jar文件但是得到了同样的问题。

dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.6.ga</version>
            <exclusions>
                <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm</artifactId>
                </exclusion>
                <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm-attrs</artifactId>
                </exclusion>
        </exclusions>
        </dependency>

2)后来我将lib文件夹中的asm和asm-aatr jar文件保存在jboss-eap-7中 (jboss-eap-7.0 \ modules \ system \ layers \ base \ asm \ asm \ main)我评论了module.xml文件中的 asm-3.3.1.redhat-12.jar 路径,得到了同样的问题。

<module xmlns="urn:jboss:module:1.3" name="asm.asm">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

  <!-- <resources>
        <resource-root path="asm-3.3.1.redhat-12.jar"/>
    </resources> -->

    <dependencies>
    </dependencies>
</module>

3)即使我在standalone.xm文件中对以下行进行了评论,因为这无法部署其他Web服务模块,这些模块也可以在早期与此brazil-standard-webservies一起部署

.
.
<extension module="org.jboss.as.webservices"/>
.
.
.
.
<subsystem xmlns="urn:jboss:domain:webservices:2.0">
            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
            <endpoint-config name="Standard-Endpoint-Config"/>
            <endpoint-config name="Recording-Endpoint-Config">
                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                </pre-handler-chain>
            </endpoint-config>
            <client-config name="Standard-Client-Config"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:weld:3.0"/>

0 个答案:

没有答案