You have installed  version 3.1.0 of Java Servlet API
However pax-web expects: (version>=2.3.0)(!(version>=3.1.0)

So from pax-web's perspective servlet api (that it needs) is not there ;)
You either need older version of servlet api (you can have both) or newer
version of pax-web (assuming there is one) that works with servlet api 3.1.x

Best,
Milen




On Mon, Mar 9, 2015 at 6:46 PM, sykomaniac <ashleysyke...@gmail.com> wrote:

> Hi,
>
> I'm trying to get the jolokia agent set up on one of my karaf installs.
>
> I've installed the osgi only bundle like so:
>
> install -s mvn:org.jolokia/jolokia-osgi/1.2.3
>
> I've also installed the following bundles to satisfy its dependencies:
> install -s mvn:javax.servlet/servlet-api/2.3
> install -s mvn:javax.servlet/javax.servlet-api/3.1.0
>
> The state of the agent is now Resolved:
> 409 | Resolved |  80 | 1.2.3    | Jolokia Agent
> 449 | Active   |  80 | 3.1.0    | Java Servlet API
> 608 | Active   |  80 |          | mvn:javax.servlet/servlet-api/2.3
>
> When I try and start it I get the following error:
>
> Caused by: java.lang.Exception: Unable to execute command on bundle 409:
> Activator start error in bundle org.jolokia.osgi [409].
>         at
>
> org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:55)
>         ... 20 more
> Caused by: org.osgi.framework.BundleException: Activator start error in
> bundle org.jolokia.osgi [409].
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:2196)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:2064)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
>         at
> org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:27)
>         at
>
> org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:53)
>         ... 20 more
> Caused by: java.lang.NoClassDefFoundError:
> org/osgi/service/http/HttpContext
>         at java.lang.Class.getDeclaredConstructors0(Native
> Method)[:1.7.0_72]
>         at java.lang.Class.privateGetDeclaredConstructors(Unknown
> Source)[:1.7.0_72]
>         at java.lang.Class.getConstructor0(Unknown Source)[:1.7.0_72]
>         at java.lang.Class.newInstance(Unknown Source)[:1.7.0_72]
>         at
> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4336)
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:2141)
>         ... 25 more
> Caused by: java.lang.ClassNotFoundException:
> org.osgi.service.http.HttpContext not found by org.jolokia.osgi [409]
>         at
>
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
>         at
>
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
>         at
>
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
>         at java.lang.ClassLoader.loadClass(Unknown Source)[:1.7.0_72]
>         ... 31 more
>
> Which I think means I need the HTTP feature installing.
>
> However, when I enter: feature:install http or feature:install
> http-whiteboard, I get the following error:
>
> Error executing command: Could not start bundle
> mvn:org.ops4j.pax.web/pax-web-api/3.1.2 in feature(s) pax-http-3.1.2:
> Unresolved constraint in bundle org.ops4j.pax.web.pax-web-api [622]: Unable
> to resolve 622.0: missing requirement [622.0]osgi.wiring.package;
> (&(osgi.wiring.package=javax.servlet)(version>=2.3.0)(!(version>=3.1.0)))
>
> Does anyone know what I'm doing wrong/missing.
>
> Karaf version is 3.0.2
>
> Thanks
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Dependecy-error-installing-HTTP-feature-tp4038890.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
http://about.me/milen

Reply via email to