Question

Karaf 2.2.3 recently released and finally has a pre-bundled spring-jms feature. In order to make life easy I added it to the featuresBoot config property with the other defaults:

featuresBoot=config,ssh,management,spring-jms

However, when I start Karaf it behaves uncontrollably. Sometimes it will install on boot and other times it doesn't. When it doesn't auto-install I attempt to add it via the command line:

features:install spring-jms

And even that behaves wildly. See below:

karaf@root> features:install spring-jms
Error executing command: java.lang.IllegalArgumentException

karaf@root> features:install spring-jms
Error executing command: invalid entry size (expected 3293 but got 16823 bytes)

karaf@root> features:install spring-jms
Error executing command: Manifest not present in the first entry of the zip mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_5

karaf@root> features:install spring-jms
Refreshing bundles org.springframework.context.support (50)
Error executing command: Could not start bundle mvn:org.eclipse.jetty/jetty-client/7.4.5.v20110725 in feature(s) jetty-7.4.5.v20110725: Unresolved constraint in bundle org.eclipse.jetty.client [83]: Unable to resolve 83.0: missing requirement [83.0] package; (&(package=org.eclipse.jetty.http)(version>=7.4.0)(!(version>=8.0.0)))

karaf@root> features:install spring-jms
Refreshing bundles org.springframework.context.support (50)

Those are back-to-back executions of the install command. The last execution works.

Anyone else see this behavior? Or know how to correct it?

Was it helpful?

Solution

Tony,

First, make sure that you are using the correct version Java, I use jdk 1.6_24. When using this, with no other bundles installed (a fresh installation), it installs properly. If I were you I would: 1) try installing a fresh instance of Karaf, 2) copy your maven repository to a new location, and 3) run Karaf in a fresh installation, 4) install spring-jms again.

If that doesn't work, reply to this and let me know your environment, along with all of the exceptions generated in your karaf log file.

OTHER TIPS

By any chance are you using a customized org.ops4j.pax.url.mvn.cfg? I am, and it has caused a huge boot-time race condition problem that led to features sporadically failing to load.

Take a look at https://issues.apache.org/jira/browse/KARAF-910 "Race between FeatureService and ConfigAdmin for resolving mvn: URLs?"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top