You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/02/21 12:05:29 UTC

Dependency with javax.* packages & UNRESOLVED CONSTRAINT (SMX4/FUSE4.2 - Felix 2.0.1)

Here is more details about the unresolved constraint

Here is what the bundle import :

karaf@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
karaf@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 <cm...@gmail.com>
Date: Fri, Feb 19, 2010 at 1:02 PM
Subject: Dependency with javax.* packages
To: users@servicemix.apache.org


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

Re: Dependency with javax.* packages & UNRESOLVED CONSTRAINT (SMX4/FUSE4.2 - Felix 2.0.1)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/22/10 4:27 PM, Charles Moulliard wrote:
> SMX4.x and Fuse 4.2 which are based on Apache Felix Karaf 1.2 are running
> Felix 2.0.1 and soon 2.0.4
>
> The bundle 0 which is the Felix bundle runtime export the JRE packages under
> the version number 0.0.0.
>
> We have different bundles importing JRE packages without having problems.
>    

Which version are they importing? I would assume 0.0.0...otherwise they 
would not match.

By default, the Felix framework associated the JRE version with JRE 
packages. This is not necessarily technically correct, but it least it 
allows people to differentiate between JRE package versions. Perhaps 
Karaf's default configuration for the framework excludes JRE package 
versions.

-> richard

> I will open a ticket
>
> 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
>
>
> On Mon, Feb 22, 2010 at 2:10 AM, Guo Du<mr...@gmail.com>  wrote:
>
>    
>> On Sun, Feb 21, 2010 at 7:48 PM, Karl Pauls<ka...@gmail.com>  wrote:
>>      
>>>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>>>> maestro_SOAFw_WebServices [117]: package;
>>>> (&(package=javax.xml.datatype)(version>=1.4.0)))
>>>>          
>>> And provided is:
>>>
>>>        
>>>> 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 ?
>>>>          
>> What's your felix/jre version?
>>
>> I run 2.0.0 on jdk 1.6 and command "headers 0"  show
>> javax.xml.datatype; version="1.6.0"
>>
>> Your "headers 0" output may help to diagnose.
>>
>> -Guo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>      
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Dependency with javax.* packages & UNRESOLVED CONSTRAINT (SMX4/FUSE4.2 - Felix 2.0.1)

Posted by Charles Moulliard <cm...@gmail.com>.
SMX4.x and Fuse 4.2 which are based on Apache Felix Karaf 1.2 are running
Felix 2.0.1 and soon 2.0.4

The bundle 0 which is the Felix bundle runtime export the JRE packages under
the version number 0.0.0.

We have different bundles importing JRE packages without having problems.

I will open a ticket

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


On Mon, Feb 22, 2010 at 2:10 AM, Guo Du <mr...@gmail.com> wrote:

> On Sun, Feb 21, 2010 at 7:48 PM, Karl Pauls <ka...@gmail.com> wrote:
> >> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> >> maestro_SOAFw_WebServices [117]: package;
> >> (&(package=javax.xml.datatype)(version>=1.4.0)))
> >
> > And provided is:
> >
> >> 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 ?
>
> What's your felix/jre version?
>
> I run 2.0.0 on jdk 1.6 and command "headers 0"  show
> javax.xml.datatype; version="1.6.0"
>
> Your "headers 0" output may help to diagnose.
>
> -Guo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Dependency with javax.* packages & UNRESOLVED CONSTRAINT (SMX4/FUSE4.2 - Felix 2.0.1)

Posted by Guo Du <mr...@gmail.com>.
On Sun, Feb 21, 2010 at 7:48 PM, Karl Pauls <ka...@gmail.com> wrote:
>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>> maestro_SOAFw_WebServices [117]: package;
>> (&(package=javax.xml.datatype)(version>=1.4.0)))
>
> And provided is:
>
>> 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 ?

What's your felix/jre version?

I run 2.0.0 on jdk 1.6 and command "headers 0"  show
javax.xml.datatype; version="1.6.0"

Your "headers 0" output may help to diagnose.

-Guo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Dependency with javax.* packages & UNRESOLVED CONSTRAINT (SMX4/FUSE4.2 - Felix 2.0.1)

Posted by Karl Pauls <ka...@gmail.com>.
Well, you have:

> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> maestro_SOAFw_WebServices [117]: package;
> (&(package=javax.xml.datatype)(version>=1.4.0)))

And provided is:

> 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 ?

Looks like you are asking for version >= 1.4 and the system bundle
exports version 0.0.0

regards,

Karl

> 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 <cm...@gmail.com>
> Date: Fri, Feb 19, 2010 at 1:02 PM
> Subject: Dependency with javax.* packages
> To: users@servicemix.apache.org
>
>
> 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
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org