Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1386

feature install war fails if http-whiteboard is already installed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.6
    • Fix Version/s: 2.2.10, 2.3.1
    • Component/s: karaf-webcontainer
    • Labels:
      None

      Description

      Installing the war feature directly works but if the http-whiteboard feature is already installed I get the exception below. We had a similar problem some time before when whiteboard and war referenced different versions of pax-web. But this is not the case here.

      The problem can be avoided by using the working order but it would be good to fix it for 2.2.7 if possible.

      Start from a clean Karaf 2.2.6
      karaf@root> features:install war
      karaf@root>

      Start from a clean Karaf 2.2.6
      ------------------------------
      karaf@root> features:install http-whiteboard
      karaf@root> features:install war
      Refreshing bundles org.ops4j.pax.web.pax-web-runtime (71), org.ops4j.pax.web.pax-web-jetty (72)
      ERROR: Bundle org.apache.karaf.deployer.features [38] 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)
      at org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:363)
      at java.lang.Thread.run(Thread.java:722)
      karaf@root> ERROR: Bundle org.apache.karaf.deployer.features [38] EventDispatcher: Error during dispatch. (java.lang.ClassCastException: org.ops4j.pax.web.servi
      ce.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.servicePropertiesModified(ServiceRegistry.java:480)
      at org.apache.felix.framework.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:116)
      at org.ops4j.pax.web.service.internal.Activator$2.updated(Activator.java:155)
      at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1160)
      at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)
      at java.lang.Thread.run(Thread.java:722)

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Fang
              Reporter:
              chris@die-schneider.net Christian Schneider
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: