Hi,

It appears that the JAXB jar file contains both the classes for JAXB 2.0 and
JAXB 1.0 to allow compatability between previous versions.  The jar has the
1.0 classes in a seperate sub folder which a normal java class loader will
not notice.  This approach confuses the bnd tool which processes the entire
jar file.

I think the solution would be to unjar the jaxb lib and remove everything in
the 1.0 directory, then re-jar and try again.

see:- http://blogs.sun.com/ritzmann/entry/osgifying_metro_for_glassfish_v3

Hope this helps,

Jason

I have just joined the list, and couldn't find the particular thread number
which I wanted to reply to - here is the original message:-

Peter Courcoux
Mon, 14 Sep 2009 06:08:57 -0700

Hi all,

I'm trying to build bundles for dependencies for an application for
deploying in felix. I'm hitting the following problem :-

java -jar ./Desktop/bnd-0.0.356.jar print ~/jaxb-xjc-2.0.3.jar


produces output including the following fragment :-

...


org.kohsuke.rngom.xml.util
org.relaxng.datatype
org.relaxng.datatype.helpers            org.relaxng.datatype

817 errors
1 : Class in different directory than declared. Path from class name is
com/sun/codemodel/CodeWriter.class but the path in the jar is
1.0/com/sun/codemodel/CodeWriter.class from Jar:jaxb-xjc-2.0.3.jar
2 : Class in different directory than declared. Path from class name is
com/sun/codemodel/JAnonymousClass.class but the path in the jar is
1.0/com/sun/codemodel/JAnonymousClass.class from Jar:jaxb-xjc-2.0.3.jar

...

It appears that the jar contains classes under both the jar root and the
1.0/ prefix.

Could someone point me in the right direction as to why this is and what
is the correct way to work around the issue.

Many thanks,

Peter

Reply via email to