java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
来源:互联网 发布:马踏棋盘贪心算法 编辑:程序博客网 时间:2024/05/18 01:20
异常信息:
Exception in thread "main" org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:217) at com.lesson.background.JettyService.main(JettyService.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus. at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:269)[org.apache.cxf.transport.http.HTTPTransportFactory] - Cannot find any registered HttpDestinationFactory from the Bus. at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:84) at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:63) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:170) ... 6 more
原因:
在使用cxf过程中经常出 Cannot find any registered HttpDestinationFactory from the Bus,一般是没有引入cxf-rt-transports-http-jetty-xxx.jar。查看apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:270)类,jettyFactory为null,也就是缺少http-jetty的实现。
解决办法:
在pom.xml文件中添加:
<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>3.1.6</version></dependency>
2 0
- java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
- java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
- Cannot find any registered HttpDestinationFactory from the Bus.
- Cannot find any registered HttpDestinationFactory from the Bus
- Cannot find any registered HttpDestinationFactory from the Bus
- java.io.filenotfoundexception: the system cannot find the file specified
- java.io.IOException: The input doesn't contain any classes. Did you specify the proper '-injars' opt
- java.io.IOException: Cannot run program "mvn":
- hive java.io.IOException: Cannot initialize Cluster
- java.io.IOException: The stream is closed
- java.lang.NoClassDefFoundError;java.io.IOException: Cannot initialize Cluster.
- NDK_报错 Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program。
- DataNode启动异常"java.io.IOException: Cannot lock storage /i/dfs/dn. The directory is already lock"
- Cannot run program : java.io.IOException: error=2
- 关于java.io.IOException: Cannot run program "unzip":
- maven hadoop2.2.0 java.io.IOException: Cannot initialize Cluster
- hadoop java.io.IOException: Cannot run program "nice"
- [解决]java.io.IOException: Cannot obtain block length for LocatedBlock
- Ubuntu12.04 编译 Hadoop 2.6.4 源码
- DrawableWrapper
- ZOJ1109 Language of FatMouse
- C++中虚析构函数的作用
- Tcl -- lappend
- java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
- Android 插件化框架 DynamicLoadApk 源码解析
- Spring 拦截器配置
- C++实验2-学生成绩
- Java经典设计模式(1):五大创建型模式(附实例和详解)
- 使用本地JConsole监控远程JVM
- Struts2的输入校验
- unity3d的playmaker插件使用教程,七、playmaker和itween
- 长度单位dp、sp和px的区别