Home » Eclipse Projects » Buckminster » org.eclipse.core.runtime bundle Problem
|Re: org.eclipse.core.runtime bundle Problem [message #925005 is a reply to message #916548]
||Thu, 27 September 2012 09:58
| Matthew Webber
Registered: December 2010
These are some draft notes on how to solve the dreaded "java returned 13" when using Buckminster to build an Eclipse product. I'll publish them once they are tidied up.|
You have successfully checked out your source code, and you workspace builds without error. However, when you attempt to create a stand-alone product (typically, via "Buckminster --> Invoke Action --> create.product" or similar), you get "java returned 13".
This error is actually nothing to do with Buckminster, but instead is issued by Eclipse's underlying PDE build. The problem can be illustrated by a simple example:
We have 3 features and 4 plugins:
base.feature = plugins: plugin.1, plugin.2
plotting.feature = plugins: plugin.3, plugin.4
product.feature = feature: base.feature, plotting.feature
The workspace will build successfully, and the product will be created successfully.
Now imaging we write a new plugin, plugin.5, and make plug.4 depend on it.
The workspace will build successfully, but the product will not be created, but instead give "java returned 13".
What happens is that when we create the product.feature, it constructs a list of feature and plugins that will make up the product. This is done by starting at the parent feature (product.feature in our example), and following all the features it points to, and then all the features they point to, etc etc. From each feature it includes all plugins listed in that feature. However, it does NOT include plugsin listed in other plugins, even if they are in the workspace. So, every plugin you need for your product must be listed in each some feature that is reachable from the parent feature.
In the example above, the new "plugin.5" needs to be added as a dependency of some feature. If we added it to product.feature, that would work, but it's not actually the correct place to add it. I should really be added to plotting.feature, since any other consumer of that will need plugin.5 (since plotting.feature includes plugin.4, and that requires plugin.5).
How to diagnose
If you get "java returned 13", then the first step is to work out what plugin is missing. Go to Window --> Preferences --> Buckminster, and increase the "Ant logger level:" to INFO. Then rerun the product create action. In the console window, near the bottom, you will see what plugin is missing, and why. Simply add it in to the correct feature, and then rerun the product create. Either the problem will be solved, or another dependency will be identified.
|Re: org.eclipse.core.runtime bundle Problem [message #933684 is a reply to message #933619]
||Fri, 05 October 2012 08:37
| Alan Underwood
Registered: October 2010
I think it would be worth trying to follow the layout of the example projects from the Bucky-book, I normally do and don't have the problems you're having.|
Have a top level feature project, which is the 'Buckminster' project or 'releng' project, containing rmaps, cquery, target-platform definitions etc.
Have a top-level feature project which is the 'application' project, containing all the sub-features and/or plug-ins you need in your application.
I usually have the .product file in the 'application' project, and it includes just the application feature.
Add the application feature as a component to your 'Buckminster' project's feature.xml.
When you select site.p2 on the 'releng' project, Buckminster will build the p2 site for the content of the 'releng' project, i.e. a p2 site for the 'application' feature.
The dependencies on org.eclipse.rcp etc are all very well, but you also need to make sure that either your top-level application feature includes the org.eclipse.rcp feature, or one of its sub-features does.
In order for director to build the product, you need to have all the component plugins, including org.eclipse.rcp, in the p2 site that you created, or you need to point director to multiple repositories so it can find the 'depended-on' plug-ins elsewhere.
I'm not sure what you mean when you describe you Product Project as a plug-in, but it has dependecies on features...how did you manage that? Plug-ins can only have dependencies on other plug-ins (or java packages). Features can include other features or plug-ins.
Finally, I haven't done any p2 updating stuff with my projects, so I don't understand exactly what you need to do the updating...
Hope that helps...
|Re: org.eclipse.core.runtime bundle Problem [message #934821 is a reply to message #933684]
||Sat, 06 October 2012 10:32
|| Lorenzo Bettini
Registered: July 2009
Location: Firenze, Italy
On 10/05/2012 10:37 AM, Alan Underwood wrote:|
> In order for director to build the product, you need to have all the
> component plugins, including org.eclipse.rcp, in the p2 site that you
> created, or you need to point director to multiple repositories so it
> can find the 'depended-on' plug-ins elsewhere.
sorry if I use this thread for asking the question, but it's strictly
related to the above paragraph, and on the original problem (I can start
a new thread if required).
I found the above issue a quite recurrent problem when building a
product with Bucky, by problem I mean that it is something not clear to
most people I talked with (though I think it's related to p2, not to
Bucky itself :)
I was wondering which is the best way of achieving "to build the
product, you need to have all the
component plugins in the p2 site that you created";
these are the alternative solutions I usually use
1. as a first solution I add additional repositories URL in the ant file
to build the product, e.g., by changing
this is a quick solution, but it requires to contact all the additional
remote update sites each time the product is built...
while all the available plugins and features would be already available
in the local target platform (otherwise my own bundles wouldn't have
2. for creating the p2 site for building the product, I have a feature
(I mean, in the releng project) which basically contains all the
features (and possibly single plugins) I use in my local target
platform... this usually works apart from some features which make Bucky
search for source features which are not there (this is related to this
thread http://www.eclipse.org/forums/index.php/m/927264/ which still did
not provide replies...)
this second solution still looks strange to me, since I have to
duplicate effort anyway... unless there's a direct way of generating a
p2 site from the current target platform.
so I was wondering which the best practice is...
the tutorials I found around did not help me much, since they are
typically based on very simple products which besides org.eclipse.rcp do
not need many other features...
thanks in advance
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
Current Time: Tue Oct 17 15:30:43 GMT 2017
Powered by FUDForum
. Page generated in 0.01906 seconds