Could not load extension class org.apache.cxf.transport.http_jetty.JettyDestinationFactory.

WebServices CXF开发异常如下

Exception in thread "main" org.apache.cxf.bus.extension.ExtensionException: Could not load extension class org.apache.cxf.transport.http_jetty.JettyDestinationFactory.
    at org.apache.cxf.bus.extension.Extension.tryClass(Extension.java:183)
    at org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:199)
    at org.apache.cxf.bus.extension.ExtensionManagerImpl.activateAllByType(ExtensionManagerImpl.java:144)
    at org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:179)
    at org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:185)
    at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:40)
    at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:36)
    at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:32)
    at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:107)
    at org.apache.cxf.BusFactory.createThreadBus(BusFactory.java:244)
    at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:228)
    at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:215)
    at org.apache.cxf.endpoint.AbstractEndpointFactory.getBus(AbstractEndpointFactory.java:86)
    at org.apache.cxf.endpoint.AbstractEndpointFactory.getBus(AbstractEndpointFactory.java:81)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:239)
    at org.apache.cxf.frontend.ServerFactoryBean.initializeServiceFactory(ServerFactoryBean.java:242)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at com.webservice.impl.Server.main(Server.java:26)
Caused by: java.lang.NoClassDefFoundError: org/apache/cxf/transport/http/HttpDestinationFactory
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.cxf.bus.extension.Extension.tryClass(Extension.java:164)
    ... 19 more
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.transport.http.HttpDestinationFactory
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 32 more

原因:Could not load extension class org.apache.cxf.transport.http_jetty.JettyDestinationFactory.   不能找到该类,查看 maven中 jar,如下图

解决办法: 在 maven 本地仓库中,删除该 jar 包,重新下载即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悟世君子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值