Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1969

Aries JAX-RS Whiteboard causes ClassCastException for bundles where CXF is used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: jax-rs-whiteboard-1.0.5, jax-rs-whiteboard-1.0.7, jax-rs-whiteboard-1.0.6
    • Fix Version/s: None
    • Component/s: jax-rs-whiteboard
    • Labels:
      None
    • Environment:

      Environment: Karaf 4.2.8

      CXF: 3.3.4

       

       

      Description

      Installing a bundle where CXF is used, for example, a SOAP web service, while jax-rs-whiteboard is running will result in class cast exceptions. 

      This only happens if the bundle providing the SOAP WS starts after jax-rs-whiteboard. This is probably a result of repacked extensions in jax-rs-whiteboard getting registered.

      Steps to reproduce:

       

      feature:install aries-jax-rs-whiteboard
      install -s mvn:org.apache.karaf.examples/karaf-soap-example-api/4.2.8
      install -s mvn:org.apache.karaf.examples/karaf-soap-example-scr/4.2.8 
      

       

      2020-01-24T09:59:09,996 | ERROR | pipe-restart 221 | karaf-soap-example-scr           | 221 - org.apache.karaf.examples.karaf-soap-example-scr - 4.2.8 | bundle org.apache.karaf.examples.karaf-soap-example-scr:4.2.8 (221)[org.
      apache.karaf.examples.soap.scr.SoapService(44)] : The activate method has thrown an exception
      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) ~[?:1.8.0_144]
              at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:307) ~[?:?]
              at org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:181) ~[?:?]
              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:238) ~[?:?]
              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) ~[?:?]
              at org.apache.karaf.examples.soap.scr.SoapService.activate(SoapService.java:38) ~[?:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
              at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[!/:?]
      

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              jassuncao Joao Assuncao
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: