Java 8 example, cannot load in Karaf or Felix, Unresolved constraint in bundle

775 views
Skip to first unread message

philip andrew

unread,
Mar 24, 2015, 1:35:51 AM3/24/15
to fab...@googlegroups.com
Hi there,

I built the .kar file and added to Karaf deploy directory.

C:\home\software\apache-karaf-3.0.3\deploy

karaf@root(log)> feature:install quickstart-karaf-camelwiki
Error executing command: Can't install feature quickstart-karaf-camelwiki/0.0.0:
Could not start bundle mvn:org.apache.camel/camel-catalog/2.15.0 in feature(s) camel-core-2.15.0: Unresolved constraint in bundle org.apache
.camel.camel-catalog [359]: Unable to resolve 359.0: missing requirement [359.0] osgi.wiring.package; (osgi.wiring.package=org.apache.camel.
catalog.archetypes)
karaf@root(log)>

Why is that? How can I fix?

In Karaf version 4

karaf@root()> feature:install quickstart-karaf-camelwiki
Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=quickstart-karaf-camelwiki; type=ka
raf.feature; version="[2.2.0.SNAPSHOT,2.2.0.SNAPSHOT]"; filter:="(&(osgi.identity=quickstart-karaf-camelwiki)(type=karaf.feature)(version>=2
.2.0.SNAPSHOT)(version<=2.2.0.SNAPSHOT))" [caused by: Unable to resolve quickstart-karaf-camelwiki/2.2.0.SNAPSHOT: missing requirement [quic
kstart-karaf-camelwiki/2.2.0.SNAPSHOT] osgi.identity; osgi.identity=camel-blueprint; type=karaf.feature; version="[2.15.0,2.15.0]" [caused b
y: Unable to resolve camel-blueprint/2.15.0: missing requirement [camel-blueprint/2.15.0] osgi.identity; osgi.identity=org.apache.camel.came
l-blueprint; type=osgi.bundle; version="[2.15.0,2.15.0]"; resolution:=mandatory [caused by: Unable to resolve org.apache.camel.camel-bluepri
nt/2.15.0: missing requirement [org.apache.camel.camel-blueprint/2.15.0] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.apache.cam
el)(version>=2.15.0)(!(version>=2.15.1)))" [caused by: Unable to resolve org.apache.camel.camel-core/2.15.0: missing requirement [org.apache
.camel.camel-core/2.15.0] osgi.identity; osgi.identity="root#camel-core-2.15.0"; type=karaf.subsystem; version="[0,0.0.0]"; resolution:=mand
atory [caused by: Unable to resolve root#camel-core-2.15.0: missing requirement [root#camel-core-2.15.0] osgi.identity; osgi.identity=camel-
core; type=karaf.feature; version="[2.15.0,2.15.0]" [caused by: Unable to resolve camel-core/2.15.0: missing requirement [camel-core/2.15.0]
 osgi.identity; osgi.identity=org.apache.camel.camel-catalog; type=osgi.bundle; version="[2.15.0,2.15.0]"; resolution:=mandatory [caused by:
 Unable to resolve org.apache.camel.camel-catalog/2.15.0: missing requirement [org.apache.camel.camel-catalog/2.15.0] osgi.wiring.package; f
ilter:="(osgi.wiring.package=org.apache.camel.catalog.archetypes)"]]]]]]]
karaf@root()>

In Felix if I want to run the jar file.

g! install file:quickstart-karaf-camelwiki.jar
Bundle ID: 15
g! start 15
org.osgi.framework.BundleException: Unresolved constraint in bundle io.fabric8.jube.images.fabric8.quickstart-karaf-camelwiki [15]: Unable t
o resolve 15.0: missing requirement [15.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint)(version>=1.0.0)(!(version
>=2.0.0)))
g!

Ok so maybe I can try quickstart-karaf-camellog in Felix.

g! install file:quickstart-karaf-camellog.jar
Bundle ID: 16
g! start 16
org.osgi.framework.BundleException: Unresolved constraint in bundle io.fabric8.jube.images.fabric8.quickstart-karaf-camellog [16]: Unable to
 resolve 16.0: missing requirement [16.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>
=2.0.0)))
g!

Philip

philip andrew

unread,
Mar 24, 2015, 1:36:25 AM3/24/15
to fab...@googlegroups.com

Claus Ibsen

unread,
Mar 24, 2015, 1:58:58 AM3/24/15
to philip andrew, fab...@googlegroups.com
Hi

That is an issue in Camel 2.15.0. Its fixed for the upcoming 2.15.1 release.
http://camel.465427.n5.nabble.com/Apache-Camel-2-15-1-patch-release-td5764661.html

It was also discovered and discussed here
http://camel.465427.n5.nabble.com/camel-catalog-2-15-0-and-karaf-2-4-1-td5764038.html
> --
> You received this message because you are subscribed to the Google Groups
> "fabric8" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fabric8+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

philip andrew

unread,
Mar 24, 2015, 2:12:28 AM3/24/15
to fab...@googlegroups.com, phili...@gmail.com
Hi Claus,

Thanks to let me know as I was trying to work out why its not working, trying to add camel to it or add other things to it as jars and that didn't work, basically trying different things and not understanding why its not working. My understanding is limited. My actual goal is to try make this Scala project work in each of the OSGi containers, so I need to have a working project to inspect and understand to some degree.


Although its a bug, its going to be fixed in next release, what steps can I take right now with Karaf to make it work?

Thanks, Philip

Claus Ibsen

unread,
Mar 24, 2015, 2:13:39 AM3/24/15
to philip andrew, fab...@googlegroups.com
Hi

You can use Camel 2.14.x instead.

philip andrew

unread,
Mar 24, 2015, 8:58:32 AM3/24/15
to fab...@googlegroups.com, phili...@gmail.com
Hi Claus,

Ok thanks again, I managed to get my project to work in Karaf.

I downloaded the older version of Karaf 2.4.1 and installed camel by running this inside Karaf.
features:chooseurl camel 2.14.0

Then I could install my Scala application which I am developing using camel using this command.

features:install com.mycompany.kar

So yes, it seems to be the camel bug your talking about.

I failed to get any more modern version of Karaf to work with camel version 2.14.0, I just don't know to do that.
Hence my question here:

Regardless I am feeling happy that the camel stuff can work so I can push ahead with development.

Philip
Reply all
Reply to author
Forward
0 new messages