karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5110) Karaf 4.1.x / httplite incompatibility
Date Wed, 18 Oct 2017 07:07:00 GMT

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

Guillaume Nodet commented on KARAF-5110:
----------------------------------------

Version 0.1.6 of httplite has a fixed import range. So the exception you see is fixed by upgrading
to it.
However, pax-web and httplite are incompatible, so you'll end up with the following exception
{code}
java.lang.IllegalStateException: HttpService must be implementing Pax-Web WebContainer!
	at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:214)
[118:org.ops4j.pax.web.pax-web-extender-whiteboard:6.0.3]
	at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:58)
[118:org.ops4j.pax.web.pax-web-extender-whiteboard:6.0.3]
	at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService.bind(ReplaceableService.java:86)
[118:org.ops4j.pax.web.pax-web-extender-whiteboard:6.0.3]
	at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService$Customizer.addingService(ReplaceableService.java:105)
[118:org.ops4j.pax.web.pax-web-extender-whiteboard:6.0.3]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
[?:?]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
[?:?]
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [?:?]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [?:?]
	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [?:?]
	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
[?:?]
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
[?:?]
	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
[?:?]
	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4578) [?:?]
	at org.apache.felix.framework.Felix.registerService(Felix.java:3570) [?:?]
	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
[?:?]
	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:322)
[?:?]
	at org.apache.felix.httplite.osgi.Activator.start(Activator.java:73) [35:org.apache.felix.httplite.complete:0.1.6]
	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) [?:?]
	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2238) [?:?]
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) [?:?]
	at org.apache.felix.framework.Felix.updateBundle(Felix.java:2505) [?:?]
	at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) [?:?]
	at org.apache.karaf.bundle.command.Update.update(Update.java:66) [46:org.apache.karaf.bundle.core:4.1.1]
	at org.apache.karaf.bundle.command.Update.doExecute(Update.java:47) [46:org.apache.karaf.bundle.core:4.1.1]
	at org.apache.karaf.bundle.command.BundleCommand.execute(BundleCommand.java:46) [46:org.apache.karaf.bundle.core:4.1.1]
	at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
[70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
[70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
[70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:560) [70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:486) [70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:375) [70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [70:org.apache.karaf.shell.core:4.1.1]
	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [70:org.apache.karaf.shell.core:4.1.1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
{code}

You should not try to deploy both at the same time.

> Karaf 4.1.x / httplite incompatibility
> --------------------------------------
>
>                 Key: KARAF-5110
>                 URL: https://issues.apache.org/jira/browse/KARAF-5110
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.1.1
>         Environment: Maven 3.3.9 / MacOS 10.12.4
>            Reporter: Stephen Winnall
>            Assignee: Guillaume Nodet
>             Fix For: 4.2.0, 4.1.4
>
>         Attachments: karaf-4.1.x-httplite.tbz
>
>
> I am trying to build a Karaf assembly using Karaf 4.1.1, Java 1.8.0_76-ea-b04, Maven
3.3.9, Netbeans 8.2 and macOS 10.12.4. I am getting an error message, even if I omit all my
own features from the build (i.e. I build an empty Karaf): 
>     java.lang.ClassCastException: org.apache.felix.httplite.osgi.HttpServiceImpl cannot
be cast to org.osgi.service.http.HttpService 
> The problem seems to be that the latest version of org.apache.felix.httplite.complete,
which provides org.apache.felix.httplite.osgi.HttpServiceImpl, i.e. 0.1.5, requires a version
of java.servlet that is incompatible with the rest of Karaf 4.1.1, which - I think - expects
3.1.0. The following comes from the MANIFEST.MF of org.apache.felix.httplite.complete-0.1.5.jar:

>     Import-Package: javax.servlet;version="[2.4,3)" 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message