Facing issue while invoking external REST webservice with message - Uses constraint violation. Unable to resolve bundle revision com.sun.jersey.json.
Issue
- User gets this error trying to add a required jar to the container.
JBossFuse:karaf@root> osgi:install -s wrap:file:///${fuse.home}/extras/jersey-json-1.18.jar
Bundle ID: 456
Error executing command: Error installing bundles:
Unable to start bundle wrap:file:///C:/jboss-fuse-6.2.0.redhat-133/extras/jersey-json-1.18.jar: Uses constraint violation. Unable to resolve bundle revision com.sun.jersey.json [456.0] because it is exposed to package 'jav
ax.ws.rs' from bundle revisions com.sun.jersey.core [431.0] and org.apache.servicemix.specs.jsr339-api-2.0 [110.0] via two dependency chains.
Chain 1:
com.sun.jersey.json [456.0]
import: (&(osgi.wiring.package=javax.ws.rs)(version>=1.1.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package=javax.ws.rs
com.sun.jersey.core [431.0]
Chain 2:
com.sun.jersey.json [456.0]
import: (&(osgi.wiring.package=org.codehaus.jackson.jaxrs)(version>=1.9.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package=org.codehaus.jackson.jaxrs; uses:=javax.ws.rs
jackson-jaxrs [423.0]
import: (osgi.wiring.package=javax.ws.rs)
|
export: osgi.wiring.package=javax.ws.rs
org.apache.servicemix.specs.jsr339-api-2.0 [110.0]
JBossFuse:karaf@root>
- How to get around this constraint?
- How to find out which bundle contains
javax.ws.rs? - Can one apply a
uses:clause in my bundles manifest?
Environment
- Red Hat JBoss Fuse
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.