You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by David Hooker <du...@gmail.com> on 2012/12/26 20:45:53 UTC

How to resolve UCV

I have a Uses Constraint Violation using Karaf:

Error executing command: Error starting bundles:
	Unable to start bundle 83: Uses constraint violation. Unable to resolve bundle revision org.apache.servicemix.bundles.jaxb-xjc [83.0] because it is exposed to package 'org.xml.sax' from bundle revisions org.apache.felix.framework [0] and com.springsource.org.apache.xmlcommons [100.0] via two dependency chains.

Chain 1:
  org.apache.servicemix.bundles.jaxb-xjc [83.0]
    import: (osgi.wiring.package=org.xml.sax)
     |
    export: osgi.wiring.package=org.xml.sax
  org.apache.felix.framework [0]

Chain 2:
  org.apache.servicemix.bundles.jaxb-xjc [83.0]
    import: (&(osgi.wiring.package=com.sun.xml.bind.util)(version>=2.2.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=com.sun.xml.bind.util; uses:=org.xml.sax
  org.apache.servicemix.bundles.jaxb-impl [85.0]
    import: (osgi.wiring.package=org.xml.sax)
     |
    export: osgi.wiring.package=org.xml.sax
  com.springsource.org.apache.xmlcommons [100.0]

I've searched on how to resolve this, and found a mention I like to set the version in the system bundle export to 1.0.0 instead of 0.0.0, but I don't know how to do this in Karaf.  The example is for Equinox which says to build a "profile" using osgi.java.profile, but I can find no mention on how to do this in Karaf.  (It also mentions to remove the package from the exports of the system bundle, so that everything resolves to the spring source bundle, but I don't know how to do that either.)

Any pointers?

Thanks,
-David-

Re: How to resolve UCV

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

You can edit $KARAF_HOME/jre.properties
to revise the system bundle package as you want there
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2012-12-27, at 上午3:45, David Hooker wrote:

> I have a Uses Constraint Violation using Karaf:
> 
> Error executing command: Error starting bundles:
> 	Unable to start bundle 83: Uses constraint violation. Unable to resolve bundle revision org.apache.servicemix.bundles.jaxb-xjc [83.0] because it is exposed to package 'org.xml.sax' from bundle revisions org.apache.felix.framework [0] and com.springsource.org.apache.xmlcommons [100.0] via two dependency chains.
> 
> Chain 1:
>  org.apache.servicemix.bundles.jaxb-xjc [83.0]
>    import: (osgi.wiring.package=org.xml.sax)
>     |
>    export: osgi.wiring.package=org.xml.sax
>  org.apache.felix.framework [0]
> 
> Chain 2:
>  org.apache.servicemix.bundles.jaxb-xjc [83.0]
>    import: (&(osgi.wiring.package=com.sun.xml.bind.util)(version>=2.2.0)(!(version>=3.0.0)))
>     |
>    export: osgi.wiring.package=com.sun.xml.bind.util; uses:=org.xml.sax
>  org.apache.servicemix.bundles.jaxb-impl [85.0]
>    import: (osgi.wiring.package=org.xml.sax)
>     |
>    export: osgi.wiring.package=org.xml.sax
>  com.springsource.org.apache.xmlcommons [100.0]
> 
> I've searched on how to resolve this, and found a mention I like to set the version in the system bundle export to 1.0.0 instead of 0.0.0, but I don't know how to do this in Karaf.  The example is for Equinox which says to build a "profile" using osgi.java.profile, but I can find no mention on how to do this in Karaf.  (It also mentions to remove the package from the exports of the system bundle, so that everything resolves to the spring source bundle, but I don't know how to do that either.)
> 
> Any pointers?
> 
> Thanks,
> -David-