Use CXF JaxWsServerFactoryBean exception Cannot find any registered HttpDestinationFactory from the Bus

camel cannot find any registered httpdestinationfactory from the bus
cxf-rt-transports-http-jetty maven

When use Apache CXF JaxWsServerFactoryBean in console mode (try to start the server by java command line) Will get exception like below:

Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
        at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:295)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:143)
        at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:93)
        at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:72)
        at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)

When same service impl used in Tomcat via Spring, it works.

<jaxws:endpoint id="abc" implementor="com.AbcServicePortTypeImpl" address="/abc">

Include cxf-rt-transports-http-jetty jar in the maven pom.xml will solve the problem.

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http-jetty</artifactId>
        <version>2.7.6</version>
    </dependency>

CXF WS-Addressing with Decoupled Endpoint but without Jetty , I found a solution to my problem. I set the decoupled_endpoint to an relative URL (not starting with http:// ) so CXF decide to use the  up vote 29 down vote favorite 4 When use Apache CXF JaxWsServerFactoryBean in console mode (try to start the server by java command line) Will get exception like below: Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.

For example, if you have below configuration and the address is defined with http appended to it, which is not a relative url to the CXFServlet configured, the above error will come.

<jaxrs:server id="helloRestService" address="http://...">
        <jaxrs:serviceBeans>
            <ref bean="helloService" />
        </jaxrs:serviceBeans>
</jaxrs:server>

Solution is to simply mention the relative url without http/https appended to address.

http://grokbase.com/t/camel/users/155f1smn4v/error-cannot-find-any-registered-httpdestinationfactory-from-the-bus

CXF Server Problem - Cannot find any registered , In a project I am working on I experience problems with a CXF server implementation. I will get an error "Cannot find any registered HttpDestinationFactory from the Bus". ServiceConstructionException at org.​apache.cxf.frontend. JaxWsServerFactoryBean.create(​JaxWsServerFactoryBean.java:211) at  CXF Server Problem - Cannot find any registered HttpDestinationFactory from the Bus. #1479

I had the same problem. And none of the google stuff was making sense. I found out in my case that I was missing the following in the spring context file:

   <import resource="classpath:META-INF/cxf/cxf.xml" />
   <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

Cannot find any registered HttpDestinationFactory from the Bus , Cannot find any registered HttpDestinationFactory from the Bus, Programmer Sought, the best WebServiceException: org.apache.cxf.service.factory. JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203) In the process of using cxf, Cannot find any registered HttpDestinationFactory from the Bus,  80 Use CXF JaxWsServerFactoryBean exception Cannot find any registered HttpDestinationFactory from the Bus Aug 16 '13 26 Spring jUnit Testing properties file Apr 25 '17 24 java.sql.SQLException: Invalid value for getInt() - 'foo' Mar 30 '16

Another solution which works with CSV 2.7.15: when you create the Bus, register an extension:

ServletDestinationFactory destinationFactory = new ServletDestinationFactory();
bus.setExtension(destinationFactory, HttpDestinationFactory.class);

Question about using CXF stand-alone, SEVERE: Cannot find any registered HttpDestinationFactory from the Bus. Exception in WebServiceException: org.apache.cxf.serv ice.factory. JaxWsServerFactoryBean.create(JaxWsServerFactory y from the Bus. lorsque vous utilisez Apache CXF JaxWsServerFactoryBean en mode console (essayer de démarrer le serveur en ligne de commande java)) Obtiendrez d'exception comme ci-dessous: Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.

Try the following, it worked for me -

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http-jetty</artifactId>
    <version>3.2.5</version>
    <exclusions>
        <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-io</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-continuation</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Question about using CXF stand-alone, All: I have a very, very simple web service that I am developing in Eclipse. HTTPTransportFactory getDe stination SEVERE: Cannot find any registered HttpDestinationFactory from the Bus. ServiceConstructionException at org.​apache.cxf.jaxws. JaxWsServerFactoryBean.create(JaxWsServerFactory  Cannot find any prov Cannot find the clas Cannot find the Sess cannot find the file cannot find the requ cannot find java.io.IOException java.io.IOException: Destroying the bus s Cannot return from o java.io.IOException Bus Cannot find find find find find find find Java client_body_temp cannot find the path Exception in thread main" java.io.IOException: The system cannot find the p" Destroying the bus stations the drive has not received any packets from the sever The Qt D-Bus module cannot

Utiliser CXF jaxwsserverfactorybean exception ne peut trouver , Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus. at org.apache.cxf.transport.http.​HTTPTransportFactory. It seems to be a conflict with some files (eg cxf config files, spring files etc) having the same name, so when multiple cxf files are unpacked into the same jar they get overwritten. I eventually got around this problem by using 'cxf-bundle-jaxrs' dependency instead of lots of individual cxf components – Matt May 27 '14 at 21:34

Cannot find any prov Cannot find the clas Cannot find the Sess cannot find the file cannot find the requ cannot find Destroying the bus s Cannot return from o Cannot cast from Vie Cannot load from mysql.proc Bus Cannot find find find find find find find find client_body_temp cannot find the path Destroying the bus stations the drive has not received any packets from the sever The Qt D-Bus module cannot be enabled Cannot override the final method from HibernateDaoSupport hci-platform 101c0000

org.apache.cxf.transport.http. Interface HttpDestinationFactory. All Known Implementing Classes: JettyDestinationFactory, NettyHttpDestinationFactory

Comments
  • Solved by add jetty dependency jars: (from apache-cxf-2.7.0.zip) cxf-rt-transports-http-jetty-2.7.0.jar, geronimo-servlet_3.0_spec-1.0.jar, jetty-*.jar, ---- Note: geronimo-servlet_3.0_spec-1.0.jar is required otherwise will get "connection refused" exception in client.
  • I would have upvoted this as an answer! Thanks
  • Consider adding a <scope>test</scope> if you only need your component tests running, when normally you would be running your app under servlet container.
  • Glad to hear that