> -----Original Message-----
> From: Willem Jiang [mailto:[email protected]]
> Sent: Monday, July 11, 2011 8:24 PM
> To: [email protected]
> Subject: Re: Building new service with newer CXF, now getting "Cannot
> find any registered HttpDestinationFactory from the Bus."
> 
> Hi,
> 
> Did you put the cxf-rt-transport-http-jetty jar into your class path ?
> If you are using mvn, you can use mvn dependency:tree to check with it.

Duh.  That was it.  Thanks.

> On Tue Jul 12 04:52:09 2011, KARR, DAVID (ATTSI) wrote:
> > I had a service with unit tests utilizing JAXRSServerFactoryBean.  I
> believe it was using CXF 2.3.2.  I'm now setting up a new service using
> CXF 2.4.1, and I'm now getting the following when I run the test:
> >
> > Jul 11, 2011 1:43:34 PM
> org.apache.cxf.transport.http.HTTPTransportFactory getDestination
> > SEVERE: Cannot find any registered HttpDestinationFactory from the
> Bus.
> >
> > I've looked at the various examples in the wiki, and I've tried
> integrating what seems like the relevant pieces, but none of those
> appeared to make any difference.
> >
> > I'm trying to set this up without using my Spring context (I know it
> uses Spring under the covers no matter what).
> >
> > I'm currently calling the following utility method to create the
> server.  The "serviceBean" is my controller instance, the one I want to
> test.
> >
> > --------------
> >      public static void create(Object serviceBean, String uri) {
> >          JAXRSServerFactoryBean  sf  = new JAXRSServerFactoryBean();
> >
> >          BindingFactoryManager   manager =
> sf.getBus().getExtension(BindingFactoryManager.class);
> >          JAXRSBindingFactory     factory = new JAXRSBindingFactory();
> >          factory.setBus(sf.getBus());
> >
> manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
> factory);
> >
> >          Map<Object, Object>  extensionsMap   = new HashMap<Object,
> Object>();
> >          extensionsMap.put("json", "application/json");
> >          extensionsMap.put("xml", "application/xml");
> >
> >          sf.setExtensionMappings(extensionsMap);
> >
> >          sf.setServiceBean(serviceBean);
> >          sf.getInInterceptors().add(new LoggingInInterceptor());
> >          sf.getOutInterceptors().add(new LoggingOutInterceptor());
> >
> >          sf.setAddress(uri);
> >
> >          sf.create();
> >      }
> > --------------
> 
> 
> 
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>          http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang

Reply via email to