Hi,

I have a problem with a vendor jar file not being a bundle.  In development, we 
wrap the jar (actually, we wrap a set of jars because of problems with split 
packages) and build and test against that.  But we're not sure of the 
legalities of redistributing the vendor's jar files.  So I was thinking I could 
use PAX URL to wrap the jars at runtime by creating a management bundle that 
would "discover" the jar files and install them using the "wrap" URL protocol.

Well, that works great!  Except that the jar files have split packages.  I 
figured it wouldn't be a problem, I'd just use the -split-package directive on 
the Export-Package instruction to tell BND how to treat the split packages.  
But that doesn't seem to be working, I get NoClassDefFoundErrors for classes in 
either jar depending on the order in which I install them.  Now, I readily 
admit I don't completely understand the details of split packages.  I mean, I 
understand what they are, but I am not an expert on resolving them or using BND 
to resolve them.

In case it's relevant, here is the directive I use for both jars:

Export-Package: com.foo.package;-split-package:=merge-first,*

(I've changed the name of the package to protect the innocent ;-) )  I know 
it's these two jars that have the split package problem, I've looked at 
everything to make sure I don't have more jar files participating in the split 
package.  If I change the order of installing the two jar files, the 
NoClassDefFoundErrors make sense for the classes mentioned, IOW, the set of 
classes in the same package in the different jar files is disjoint and loading 
them in a different order makes the classdefnotfounderror be for a class in the 
jar file that is loaded later.

Am I going down the right path here and I'm just missing something?  Or is 
there something else I should be doing, e.g. can I have PAX URL wrap a set of 
jar files as a single bundle?  Thanks for any help!

Cheers,
Craig


_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to