转自:https://www.cnblogs.com/yfceshi/p/6814802.html
Caused by: javax.xml.ws. WebServiceException : java.lang. RuntimeException : No ASM ClassWriterFound at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java: 371 ) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java: 251 ) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java: 539 ) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method ) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25 ) at java.lang.reflect. Method .invoke( Method .java: 597 ) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java: 1546 ) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java: 1487 ) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java: 1419 ) ... 36 more Caused by: java.lang. RuntimeException : No ASM ClassWriterFound at org.apache.cxf.common.util.ASMHelper.createClassWriter(ASMHelper.java: 269 ) at org.apache.cxf.jaxws.WrapperClassGenerator.createWrapperClass(WrapperClassGenerator.java: 151 ) 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 ) ... 45 more Caused by: java.lang. NoClassDefFoundError : org/objectweb/asm/ClassWriter at org.apache.cxf.common.util.ASMHelper.getASMClassWriterClass(ASMHelper.java: 86 ) at org.apache.cxf.common.util.ASMHelper.getASMClass(ASMHelper.java: 97 ) at org.apache.cxf.common.util.ASMHelper.createClassWriter(ASMHelper.java: 266 ) ... 59 more Caused by: java.lang. ClassNotFoundException : org.objectweb.asm.ClassWriter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: 1645 ) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: 1491 ) at java.lang. ClassLoader .loadClassInternal( ClassLoader .java: 320 ) ... 62 more |
解决办法:
将CXF安装目录下/lib/asm-3.3.1.jar 文件导入到项目中即可。