Karaf
  1. Karaf
  2. KARAF-1174

war feature cannot be installed after the cxf

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.6, 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      features:addurl mvn:org.apache.cxf.karaf/apache-cxf/2.5.2/xml/features
      features:install cxf
      features:install war

      1. karaf.log
        85 kB
        Alexey Markevich

        Issue Links

          Activity

          Hide
          Christian Schneider added a comment -

          I can reproduce the problem:

          The stacktrace looks like this:
          2012-02-08 09:07:06.365:INFO:oejsh.ContextHandler:stopped HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.karaf.deployer.features [34]}}
          ERROR: Bundle org.apache.cxf.bundle [134] EventDispatcher: Error during dispatch. (java.lang.ClassCastException: org.ops4j.pax.web.service.internal.HttpServiceProxy cannot be cast
          to org.osgi.service.http.HttpService)
          java.lang.ClassCastException: org.ops4j.pax.web.service.internal.HttpServiceProxy cannot be cast to org.osgi.service.http.HttpService
          at org.ops4j.pax.web.extender.whiteboard.internal.HttpServiceTracker.addingService(HttpServiceTracker.java:104)
          at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
          at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
          at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
          at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
          at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
          at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
          at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
          at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3772)
          at org.apache.felix.framework.Felix.access$000(Felix.java:80)
          at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:729)
          at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107)
          at org.apache.felix.framework.Felix.registerService(Felix.java:2861)
          at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
          at org.ops4j.pax.web.service.internal.Activator.createHttpServiceFactory(Activator.java:111)
          at org.ops4j.pax.web.service.internal.Activator.access$900(Activator.java:70)
          at org.ops4j.pax.web.service.internal.Activator$DynamicsServiceTrackerCustomizer.addingService(Activator.java:332)
          at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
          at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
          at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
          at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
          at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
          at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
          at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
          at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3772)
          at org.apache.felix.framework.Felix.access$000(Felix.java:80)
          at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:729)
          at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107)
          at org.apache.felix.framework.Felix.registerService(Felix.java:2861)
          at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
          at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
          at org.ops4j.pax.web.service.jetty.internal.Activator.start(Activator.java:46)
          at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
          at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)
          at org.apache.felix.framework.Felix.startBundle(Felix.java:1759)
          at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:4534)
          at org.apache.felix.framework.Felix.refreshPackages(Felix.java:3591)
          2012-02-08 09:07:06.460:INFO:oejs.Server:jetty-7.5.4.v20111024
          at org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:363)
          at java.lang.Thread.run(Thread.java:662)

          Show
          Christian Schneider added a comment - I can reproduce the problem: The stacktrace looks like this: 2012-02-08 09:07:06.365:INFO:oejsh.ContextHandler:stopped HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.karaf.deployer.features [34] }} ERROR: Bundle org.apache.cxf.bundle [134] EventDispatcher: Error during dispatch. (java.lang.ClassCastException: org.ops4j.pax.web.service.internal.HttpServiceProxy cannot be cast to org.osgi.service.http.HttpService) java.lang.ClassCastException: org.ops4j.pax.web.service.internal.HttpServiceProxy cannot be cast to org.osgi.service.http.HttpService at org.ops4j.pax.web.extender.whiteboard.internal.HttpServiceTracker.addingService(HttpServiceTracker.java:104) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3772) at org.apache.felix.framework.Felix.access$000(Felix.java:80) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:729) at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107) at org.apache.felix.framework.Felix.registerService(Felix.java:2861) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251) at org.ops4j.pax.web.service.internal.Activator.createHttpServiceFactory(Activator.java:111) at org.ops4j.pax.web.service.internal.Activator.access$900(Activator.java:70) at org.ops4j.pax.web.service.internal.Activator$DynamicsServiceTrackerCustomizer.addingService(Activator.java:332) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3772) at org.apache.felix.framework.Felix.access$000(Felix.java:80) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:729) at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107) at org.apache.felix.framework.Felix.registerService(Felix.java:2861) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229) at org.ops4j.pax.web.service.jetty.internal.Activator.start(Activator.java:46) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842) at org.apache.felix.framework.Felix.startBundle(Felix.java:1759) at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:4534) at org.apache.felix.framework.Felix.refreshPackages(Felix.java:3591) 2012-02-08 09:07:06.460:INFO:oejs.Server:jetty-7.5.4.v20111024 at org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:363) at java.lang.Thread.run(Thread.java:662)
          Hide
          Christian Schneider added a comment -

          The problem is that cxf depends on some pax web 1.0.7 bundles and karaf 2.2.5 depends on pax web 1.0.8 bundles. It seems they may not be loaded both at the same time.
          The correct fix seems to be to not depdend on a specific version of pax web in cxf. So this should be solved in cxf.

          Show
          Christian Schneider added a comment - The problem is that cxf depends on some pax web 1.0.7 bundles and karaf 2.2.5 depends on pax web 1.0.8 bundles. It seems they may not be loaded both at the same time. The correct fix seems to be to not depdend on a specific version of pax web in cxf. So this should be solved in cxf.
          Hide
          Christian Schneider added a comment -

          This should be solved in CXF. So linking the issue in CXF

          Show
          Christian Schneider added a comment - This should be solved in CXF. So linking the issue in CXF
          Hide
          Christian Schneider added a comment -

          I will add a new feature http-whiteboard to karaf 2.2.x (it is already present in karaf 3). Then cxf can depend on this and should work

          Show
          Christian Schneider added a comment - I will add a new feature http-whiteboard to karaf 2.2.x (it is already present in karaf 3). Then cxf can depend on this and should work
          Hide
          Freeman Fang added a comment -

          I believe CCE
          the java.lang.ClassCastException: org.ops4j.pax.web.service.internal.HttpServiceProxy cannot be cast to org.osgi.service.http.HttpService
          is caused by when we refresh pax-web bundles(pax-web-jsp, pax-web-runtime, pax-web-extender-whiteboard), the HttpSerivceTracker from pax-web-extender-whiteboard not get closed explicitly, so pax-web-runtime may use out-of-data HttpServiceTracker when publish HttpService, which cause this CCE. PAXWEB-412[1] tracked it.

          Btw, this CCE is harmless but just annonying as pax-web-extender-whiteboard will find the HttpService anyway when init a new HttpServiceTracker after refresh.

          [1]http://team.ops4j.org/browse/PAXWEB-412

          Show
          Freeman Fang added a comment - I believe CCE the java.lang.ClassCastException: org.ops4j.pax.web.service.internal.HttpServiceProxy cannot be cast to org.osgi.service.http.HttpService is caused by when we refresh pax-web bundles(pax-web-jsp, pax-web-runtime, pax-web-extender-whiteboard), the HttpSerivceTracker from pax-web-extender-whiteboard not get closed explicitly, so pax-web-runtime may use out-of-data HttpServiceTracker when publish HttpService, which cause this CCE. PAXWEB-412 [1] tracked it. Btw, this CCE is harmless but just annonying as pax-web-extender-whiteboard will find the HttpService anyway when init a new HttpServiceTracker after refresh. [1] http://team.ops4j.org/browse/PAXWEB-412

            People

            • Assignee:
              Christian Schneider
              Reporter:
              Alexey Markevich
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development