Hi Carlos, I think that is the case but I can't find the cause. To give you a better idea of the situation, we have a bundle (Bundle A) that launches a CXF server that will publish a SOAP WS at port 8085. We then have another bundle (Bundle B) providing a few REST endpoints that will be published by JAX RS whiteboard using the default Karaf Jetty server (port 8181). If the JAX RS whiteboard bundle is installed, when Bundle A starts it will fail with the ClassCastException. Bundle B doesn't use CXF and doesn't need to be installed for the issue to happen. As a workaround I reverted back to JAX-RS Whiteboard 1.4.0
Out of topic. The decision to use the Aries DSL to register services results in cleaner code but makes stack traces longer and almost unreadable. Debugging is also harder. Do Aries contributors have any techniques to make it easier ? Thank you for your time. Regards, João Assunção Email: joao.assun...@exploitsys.com Mobile: +351 916968984 Phone: +351 211933149 Web: www.exploitsys.com On Fri, Sep 27, 2019 at 8:04 AM Carlos Sierra Andrés <csie...@gmail.com> wrote: > Hi there, > > is it possible that your application and the whiteboard are importing > FactoryBeanListenerManager from different bundles?. In order to use CXF > directly with the whiteboard you would need to export the packages from the > whiteboard using a fragment and then import them from your bundles. > > Carlos. > El 26/9/19 a las 18:50, João Assunção escribió: > > Hello all, > I recently upgraded to JAX-RS Whiteboard 1.6.0 (was using 1.1.0) and I'm > experiencing some class loading issues related to CXF. One of the > components in my application exposes a CXF based web service that is now > failing with the following stack trace: > > java.lang.ClassCastException: Cannot cast > org.apache.cxf.service.factory.FactoryBeanListenerManager to > org.apache.cxf.service.factory.FactoryBeanListenerManager > at java.lang.Class.cast(Class.java:3369) ~[?:?] > at > org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:317) > ~[?:?] > at > org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:185) > ~[?:?] > at > org.apache.cxf.service.factory.AbstractServiceFactoryBean.setBus(AbstractServiceFactoryBean.java:98) > ~[?:?] > at > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:248) > ~[?:?] > at > org.apache.cxf.frontend.ServerFactoryBean.initializeServiceFactory(ServerFactoryBean.java:242) > ~[?:?] > at > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) > ~[?:?] > at > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168) > ~[?:?] > at > org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) > ~[?:?] > > I think this is related to the change made in 1.5.0 where the JAX-RS > Whiteboard team changed the way CXF is embedded. > I'm using CXF 3.2.5 with Karaf 4.2.6 > > Regards, > João Assunção > > Email: joao.assun...@exploitsys.com > Mobile: +351 916968984 > Phone: +351 211933149 > Web: www.exploitsys.com > > >