cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-4090) Can not load cxf and war feature in Karaf 2.2.5
Date Tue, 21 Aug 2012 06:35:38 GMT

    [ https://issues.apache.org/jira/browse/CXF-4090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438483#comment-13438483
] 

Freeman Fang edited comment on CXF-4090 at 8/21/12 5:35 PM:
------------------------------------------------------------

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
                
      was (Author: ffang):
    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.

[1]http://team.ops4j.org/browse/PAXWEB-412
                  
> Can not load cxf and war feature in Karaf 2.2.5
> -----------------------------------------------
>
>                 Key: CXF-4090
>                 URL: https://issues.apache.org/jira/browse/CXF-4090
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.6
>
>
> Steps to reproduce:
> Start fresh Karaf 2.2.5
> features:addurl mvn:org.apache.cxf.karaf/apache-cxf/2.5.2/xml/features
> features:install cxf
> features:install war
> 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)
> ------------------------
> Loading the war feature first also does not work. This way we get
> java.lang.Exception: Could not start bundle mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/1.0.7
in feature(s) cxf-war-java5-2.5.2: Activator start error in bundle org.ops4j.pax
> .web.pax-web-extender-whiteboard [89].
>         at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:356)[16:org.apache.karaf.features.core:2.2.5]
>         at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:283)[16:org.apache.karaf.features.core:2.2.5]
>         at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:279)[16:org.apache.karaf.features.core:2.2.5]
>         at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)[26:org.apache.karaf.features.command:2.2.5]
>         at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)[26:org.apache.karaf.features.command:2.2.5]
>         at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.2.5]
>         at org.apache.karaf.shell.console.jline.Console.run(Console.java:221)[14:org.apache.karaf.shell.console:2.2.5]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_30]
> Caused by: org.osgi.framework.BundleException: Activator start error in bundle org.ops4j.pax.web.pax-web-extender-whiteboard
[89].
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:1889)[org.apache.felix.framework-3.0.9.jar:]
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1759)[org.apache.felix.framework-3.0.9.jar:]
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:918)[org.apache.felix.framework-3.0.9.jar:]
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)[org.apache.felix.framework-3.0.9.jar:]
>         at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)[16:org.apache.karaf.features.core:2.2.5]
>         ... 15 more
> Caused by: java.lang.IllegalStateException: Http context already used. Context params
can be set only before first usage
>         at org.ops4j.pax.web.service.internal.HttpServiceStarted.setContextParam(HttpServiceStarted.java:353)[69:org.ops4j.pax.web.pax-web-runtime:1.0.8]
>         at org.ops4j.pax.web.service.internal.HttpServiceProxy.setContextParam(HttpServiceProxy.java:174)[69:org.ops4j.pax.web.pax-web-runtime:1.0.8]
>         at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerHttpContext(WebApplication.java:190)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.setHttpContextMapping(WebApplication.java:157)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.ops4j.pax.web.extender.whiteboard.internal.ExtenderContext.getWebApplication(ExtenderContext.java:68)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:135)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.ops4j.pax.web.extender.whiteboard.internal.tracker.ListenerTracker.addingService(ListenerTracker.java:36)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)[karaf.jar:2.2.5]
>         at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)[karaf.jar:2.2.5]
>         at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)[karaf.jar:2.2.5]
>         at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)[karaf.jar:2.2.5]
>         at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)[karaf.jar:2.2.5]
>         at org.ops4j.pax.web.extender.whiteboard.internal.Activator.trackListeners(Activator.java:202)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.ops4j.pax.web.extender.whiteboard.internal.Activator.start(Activator.java:81)[89:org.ops4j.pax.web.pax-web-extender-whiteboard:1.0.7]
>         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)[org.apache.felix.framework-3.0.9.jar:]
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)[org.apache.felix.framework-3.0.9.jar:]
>         ... 19 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message