I have some 3rd party libraries that I need for one of my bundles. As I understand the documentation, I should be able to copy these into the repository/usr directory and my bundle will then be able to find them. It cannot. My bundle won't start and the error message is complaining about these libraries not being found.
The libraries in question are not bundles just plain old jar files. I use them all the time in other java applications.
Is my understanding of all this correct?
An Import-Package could not be resolved. Caused by missing constraint in bundle <OBHFrequency_18.104.22.168201261517>
constraint: <Import-Package: org.apache.hadoop.mapreduce.lib.input; version="0.0.0">
Alas, making bundles of these jars--which are all the stuff it takes to access hadoop--was one of the first things I tried. I quickly found myself sojourning in dependency hell. Hence, I am looking for a way to put these packages on the main Virgo classpath. Is such a thing is possible?
I must say that as much as I like OSGi incorporating legacy code can be a nightmarish experience.
I'm afraid putting JARs on the main Virgo classpath is an anti-pattern that I wouldn't recommend. It can be done by adding those JARs into the set that are used to launch Virgo and then exporting the relevant packages from the system bundle via the java6-server.profile, but Virgo was not designed with this use case in mind, so you may not get very far.
Have you posted on hadoop mailing lists to see if someone else had created OSGi bundles they could share?