Here is more details about the unresolved constraint

Here is what the bundle import :

ka...@root> headers 117

MAESTRO :: SOA Fw :: WebServices (117)
--------------------------------------
Bnd-LastModified = 1266589733099
Build-Jdk = 1.6.0_16
Built-By = T0106319
Bundle-ManifestVersion = 2
Bundle-Name = MAESTRO :: SOA Fw :: WebServices
Bundle-SymbolicName = maestro_SOAFw_WebServices
Bundle-Version = 0.4.0.migr-42-SNAPSHOT
Created-By = Apache Maven Bundle Plugin
DynamicImport-Package = javax.*,org.w3c.*,org.xml.*
Export-Package =
com.thalesgroup.maestro.wsdl.system.xsd;uses:="javax.xml.bind.annotation,javax.xml.datatype",com.thalesgroup.maestro.wsdl.event;uses:="javax.jws.soap,javax.jws,javax.xml.bind.annotation,com.thalesgroup.maestro.wsdl.event.xsd,javax.xml.ws,javax.xml.namespace",com.thalesgroup.maestro.wsdl.sop.xsd;uses:="javax.xml.bind.annotation,javax.xml.datatype",wsdl,com.thalesgroup.maestro.wsdl.status.xsd;uses:="javax.xml.bind.annotation,javax.xml.datatype",com.thalesgroup.maestro.wsdl.alarm.x
sd;uses:="javax.xml.bind.annotation,javax.xml.datatype",com.thalesgroup.maestro.wsdl.alarm;uses:="javax.jws.soap,javax.jws,com.thalesgroup.maestro.wsdl.alarm.xsd,javax.xml.bind.annotation,javax.xml.ws,javax.xml.namespace",com.thalesgroup.maestro.wsdl.event.xsd;uses:="javax.xml.bind.annotation,javax.xml.datatype",com.thalesgroup.maestro.wsdl.system;uses:="javax.jws.soap,com.thalesgroup.maestro.wsdl.system.xsd,javax.jws,javax.xml.bind.annotation,javax.xml.ws,javax.xml.namespace",com.thalesgroup.ma
estro.wsdl.command.xsd;uses:="javax.xml.bind.annotation,javax.xml.datatype",com.thalesgroup.maestro.wsdl.status;uses:="javax.jws.soap,javax.jws,com.thalesgroup.maestro.wsdl.status.xsd,javax.xml.bind.annotation,javax.xml.ws,javax.xml.namespace",com.thalesgroup.maestro.wsdl.command;uses:="javax.jws.soap,javax.jws,javax.xml.bind.annotation,javax.xml.ws,javax.xml.namespace,com.thalesgroup.maestro.wsdl.command.xsd",com.thalesgroup.maestro.wsdl.sop;uses:="javax.jws.soap,com.thalesgroup.maestro.wsdl.so
p.xsd,javax.jws,javax.xml.bind.annotation,javax.xml.ws,javax.xml.namespace"
Import-Package =
com.thalesgroup.maestro.wsdl.alarm,com.thalesgroup.maestro.wsdl.alarm.xsd,com.thalesgroup.maestro.wsdl.command,com.thalesgroup.maestro.wsdl.command.xsd,com.thalesgroup.maestro.wsdl.event,com.thalesgroup.maestro.wsdl.event.xsd,com.thalesgroup.maestro.wsdl.sop,com.thalesgroup.maestro.wsdl.sop.xsd,com.thalesgroup.maestro.wsdl.status,com.thalesgroup.maestro.wsdl.status.xsd,com.thalesgroup.maestro.wsdl.system,com.thalesgroup.maestro.wsdl.system.xsd,javax.jws;version="2.0",javax.jws.s
oap;version="2.0",javax.xml.bind.annotation;version="2.1",javax.xml.datatype;version="1.4",javax.xml.namespace;version="1.4",javax.xml.ws;version="2.1",wsdl
Manifest-Version = 1.0
Tool = Bnd-0.0.238
ka...@root>

So we see that the bundle import the following package :
javax.xml.datatype;version="1.4" and that
DynamicImport-Package = javax.*,org.w3c.*,org.xml.* has been defined

And the error generated :

DEBUG: DYNAMIC WIRE: 114.0 -> org.apache.camel.spi -> 44.0
DEBUG: META-INF/services/javax.xml.parsers.DocumentBuilderFactory
DEBUG: META-INF/services/javax.xml.parsers.DocumentBuilderFactory
ERROR: Error starting
file:/D:/Dev/apache-servicemix-4.2.0-fuse-01-00/deploy/maestro-webservices-0.4.0-migr-4.2-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
maestro_SOAFw_WebServices [117]: package;
(&(package=javax.xml.datatype)(version>=1.4.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
maestro_SOAFw_WebServices [117]: package;
(&(package=javax.xml.datatype)(version>=1.4.0))
DEBUG: DYNAMIC WIRE: 114.0 -> com.sun.org.apache.xerces.internal.jaxp -> 0
DEBUG: DYNAMIC WIRE: 114.0 -> org.xml.sax -> 0  at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at 
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)

If we check what is exported by the bundle 0 (=jre) of Felix, we see
that datatype is exported :

System Bundle (0): javax.xml.datatype; version=0.0.0

Can someone tell me what is wrong ?


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


---------- Forwarded message ----------
From: Charles Moulliard <[email protected]>
Date: Fri, Feb 19, 2010 at 1:02 PM
Subject: Dependency with javax.* packages
To: [email protected]


Hi,

I have discovered something strange that I don't understand and I need a
solution

If in the maven-bundle-plugin instruction, I had the * in the ImportPackage
instruction and that my bundle has dependencies with javax.* packages (like
javax.xml, ...), then the MANIFEST.FS file which is generated contains the
package import statement javax.xml;version="1.4"

When my bundle is deployed top of Fuse 4.2 server, I get an unresolved
dependency. This is logic as the javax.* packages of the java VM are
exported with the version number = "0.0.0" and not "1.4"

What is the trick to avoid this problem (using DynamicImport-Package =
javax.*,org.w3c.*,org.xml.*) ?

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Reply via email to