| Virgo Repository [message #784016] |
Thu, 26 January 2012 18:45  |
Geoffry Roberts Messages: 21 Registered: March 2011 |
Junior Member |
|
|
All,
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?
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <OBHFrequency_1.0.0.201201261517>
constraint: <Import-Package: org.apache.hadoop.mapreduce.lib.input; version="0.0.0">
Thanks
|
|
|
|
| Re: Virgo Repository [message #784237 is a reply to message #784016] |
Fri, 27 January 2012 03:32   |
|
Hi
As far as I know your libraries must be valid OSGi bundles otherwise they will not get picked up. You have several options here.
1.) Check one of the OSGi bundle repositories that are available online, e.g. SpringSource EBR - http://ebr.springsource.com/repository/app/
2.) Transform your library into a valid OSGi bundle. There are quite a lot of tools to do that, like bnd and Eclipse PDE. I'm not sure but IIRC bundlor is also able to do that.
3.) Embed the libraries inside an OSGi bundle's classpath and export the packages. Again there are tools to do that, e.g. Eclipse PDE or the maven-bundle-plugin/bnd.
|
|
|
|
| Re: Virgo Repository [message #786325 is a reply to message #784534] |
Mon, 30 January 2012 04:17  |
Glyn Normington Messages: 1186 Registered: July 2009 |
Senior Member |
|
|
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?
|
|
|
Powered by
FUDForum. Page generated in 0.01889 seconds