|
Re: Help with import-package [message #663215 is a reply to message #663200] |
Mon, 04 April 2011 11:17 |
|
In any case you will have to find the bundle that provides the needed package (as there may be more than one bundle that provides some functionality). Seems you need the org.eclipse.equinox.p2.core bundle, but there may be imports that are missing.
You can use the Virgo Tooling to help you search in EBR and test the application:
http://www.eclipse.org/virgo/documentation/virgo-documentati on-2.1.0.RELEASE/docs/virgo-programmer-guide/html/ch07s03.ht ml
If the bundle is not available in EBR however you will need to manually provide it in Virgo's repository/usr directory and try to use (or just start) the bundles you need. When you have everything working you may want to move the bundles to repository/ext and restart Virgo with "-clean" option.
Eclipse provides the launch configuration editor. You can use it to have automatically selected all the needed dependencies and then copy them to repository/usr to test you application. The drawback is that if the bundles you use are not included in the Eclipse distribution you will have to define target platform to specify external location (P2 repository) as well.
|
|
|
|
Re: Help with import-package [message #663383 is a reply to message #663354] |
Mon, 04 April 2011 20:00 |
|
I guess you simply use Import-Package and not Import-Bundle or Import-Library?
If so then this problem looks like a missing bundle / package.
Exposing operation B requires that bundle A functions correctly. To ensure this you will have to provide all the needed packages. The packages needed for A to work as expected can be found in the META-INF/MANIFEST.MF of the bundle. In your case this seems to be "org.eclipse.equinox.p2.metadata.repository".
The imported packages may in turn import another package to perform the requested operation. This means that if we have the chain:
B --[imports]--> A --[imports]--> X --[imports]--> Y
then to have B working you will need A, X and Y.
You can check this post in my blog for a short tutorial how to use the Dependency Analysis in Eclipse to quickly find all the needed bundles.
In fact not all of them may be needed for a certain operation (namely B), but you will either have to find this by yourself or simply grab all the bundles.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03021 seconds