The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

350034 (1) [Avatar] Offline
#1
I'm following Chapter 13 and deploying the riderautoparts-osgi in a Karaf container.

Once I compiled the code, I believe it's using Camel 2.14.1. The version of Karaf I'm using is 4.0.0.M2. I did not download the custom.properties as I think this does not apply to this version of Karaf. I successfully installed: http, camel and camel-cxf. When installing camel-xcf it complained:

Error executing command: Unable to resolve root: missing requirement [root] osgi
.identity; osgi.identity=cxf-http-jetty; type=karaf.feature; version="[2.7.0,4.0
.0)" [caused by: Unable to resolve cxf-http-jetty/3.0.2: missing requirement [cx
f-http-jetty/3.0.2] osgi.identity; osgi.identity=org.apache.cxf.cxf-rt-transport
s-http-jetty; type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [
caused by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2] osgi.wir
ing.package; filter:="(&(osgi.wiring.package=org.eclipse.jetty.continuation)(ver
sion>=7.6.0)(!(version>=8.2.0)))"]]

However, when I typed the bundle:list command every thing was in Active state. The diag command revealed nothing.

The installation of riderautoparts-osgi was fine. It showed that the bundle was in Installed state. When I started the bundle it seems fine. However, the list command revealed that the riderautoparts-osgi bundle was in Failure state. The diag command showed that an exception had occurred stating:

Exception:
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema n
amespace [http://camel.apache.org/schema/cxf]
Offending resource: URL [bundle://109.0:0/META-INF/spring/applicationContext.xml
]

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Config
uration problem: Unable to locate Spring NamespaceHandler for XML schema namespa
ce [http://camel.apache.org/schema/cxf]
Offending resource: URL [bundle://109.0:0/META-INF/spring/applicationContext.xml
]

at org.springframework.beans.factory.parsing.FailFastProblemReporter.err
or(FailFastProblemReporter.java:6smilie
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC
ontext.java:85)

Does anyone have any idea how to fix this?

Thanks
davsclaus (413) [Avatar] Offline
#2
Camel 2.14.x does not support Karaf 4.x. You can use Karaf 2.4 or 3.0.x. Though its most heavily tested with Karaf 2.4.x

Camel 2.15.1 (2.15.0 has an issue) is said to support Karaf 4.x but I have not personally tried that. But 2.15.1 is not yet released but in a couple of weeks its expected.