Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Folder configuration/org.eclipse.osgi/bundles with jars is missing

Hi Boris,

I am not sure I can help with your specific case, but at least I can try to clarify some of the things confusing you.

To start with, as you know Eclipse RCP is built on top of Equinox, an implementation of OSGi framework. It is cool because Eclipse RCP functionality can be contributed in individual bundles (plugins, features, plugin patches etc.), which will be loaded on demand and can be unloaded upon request by OSGi framework. This all sounds great, but in order to launch an RCP application you need to tell OSGi framework where it can find its bundles. This is what p2 is for: installing and uninstalling OSGi bundles and other artifacts into an RCP application. Now, how does p2 know where to find the bundles? Well, it looks in p2 repositories, which are produced by your build tool such as Tycho. Let us sum this up,
 - Tycho build produces an eclipse (p2) repository
 - Tycho may also materialize (install) a product (rcp application) from this repository. During this process bundles in installable state from p2 repo are converted into bundles in runnable state in destination directory.
 - When Eclipse RCP is launched, a small program called simpleconfigurator updates the list of bundles available for OSGi framework and hands over control to it.

If I interpret your description correctly, you've successfully built a p2 repo and materialized the product, but could not launch it. Furthermore, you believe this happens because configuration/org.eclipse.osgi/bundle/X/Y/.cp directory is missing. The thing is this directory is a runtime artifact produced by OSGi framework when it loads a bundle. The fact that this directory is missing is most likely not a reason for launch failure but its consequence. Hence, the error is somewhere else. It is difficult to be more concrete because you didn't provide an error trace. As a random guess, I would start by double-checking that the required jars are indeed nested in your plugin's jar file so OSGi framework has something to install. If it does not help, and the error trace is not too inspiring, I'd create a small test project which demonstrates your problem so others can try it locally.

Kind regards,
Mikhail Kalkov

Eclipse Developer | Purple Scout AB |
Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden

On Sun, Apr 6, 2014 at 11:20 PM, Boris Lenzinger <boris.lenzinger@xxxxxxxxx> wrote:

I am facing a problem on a tycho build for an RCP application that I did not develop. I'm integrating the build of the application in a build server. The persons that are developping the application are not using any automated build (this is my role).

I'm doing a lot of build in ant (and starting with gradle). I used to know maven...This to say that I am not a newbie in building tools but a little bit with maven :-)

I have read some tutorials about how to build RCP applications, how to use tycho to build them, etc. I have an output that is almost fine. But only almost.

The application is composed of one plugin (the whole application). The dev team is supplying only one folder for this application. Following the tutorials, I have declared an eclipse-repository that is packaged as eclipse-repository. I have added a feature that is built as eclipse-feature. The feature is referencing the plugin as shown in the itp-rcp04 demo project.

The build is successful and the packaging of the application is done with the plugin stored in the plugin folder. My problem is that I need the jars that are listed in the MANIFEST.MF to be present in the folder configuration/org.eclipse.osgi/bundle/X/Y/.cp (where X and Y are numbers). But the org.eclipse.osgi folder is not present.

I know that these folders are required since :
  - I have compared my build and the one that I am supposed to have and this is missing
  - the application is not starting if this folder (with all the jars) is missing

I thought that the META-INF/MANIFEST.MF was describing the OSGi requirements and the output was built based on this file. So I have added the jars in the description of the MANIFEST.MF and it did not work. I have tried to use the simple project itp04-rcp to understand how to do that but it is still not working.

I had this working and made some small changes...and I cannot remember what I have changed but it is not working. Since it was experimental I had not put it under version it is but it is not working anymore...

I cannot supply code since this is an internal project and I don't own the code. But I can do tests with the itp04-rcp project.

Anyone can help me on this ? what do I miss in the mecanism ?

Thank you.


tycho-user mailing list

Back to the top