Home » Archived » 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 Messages: 198 Registered: December 2010 |
Senior Member |
|
|
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.
The problem
===========
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".
The cause
=========
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.
Matthew Webber
|
|
| | |
Re: org.eclipse.core.runtime bundle Problem [message #932594 is a reply to message #932510] |
Thu, 04 October 2012 08:53   |
Alex Prak Messages: 10 Registered: September 2012 |
Junior Member |
|
|
Ok I solved this problem.
I had to add org.eclipse.rcp as a Dependencie to my Build-Project. Now I have the files in the generated Export folder but my Application still does not start.
I compared every folder and this are the Differences.
#1
My generated configuration folder have
- org.eclipse.equinox.simpleConfigurator
- org.eclipse.equinox.source
But he must have
- org.eclipse.core.runtime
- org.eclipse.equinox.app
- org.eclipse.equinox.launcher
- org.eclipse.osgi
- org.eclipse.update
#2
In the folder Plugins I have all the Eclipse Plugins and my Projects as Plugins. The Problem here is that my all my Projects are named like
de.company.tdb.common_1.5.0.qualifier.
How can I remove the qualifier? In my Buckminster-Properties file I have the line
qualifier.replacement.*=generator:lastRevision
which not works.
#3
In my exported Product I have no feature folder, but there have to be one. The folder have to include my Projects UpdateFeature and rcpupdate and the Eclipse Feature org.eclipse.rcp.
#4
My p2 folder misses
- de.company.tdb.product.product_root.win32.....
- org.eclipse.rcp_root_3.7.....
in p2/core/cache/binary
#5
My exported Product has 2 exe files. One exe is my Product.exe with the right icon. The Second exe is a eclipsec.exe. I have no idea how it gets there.
Anybody got an idea how to solve this? I create the site.p2 with Buckminster in the Eclipse IDE and the product with the director command in the prompt.
[Updated on: Thu, 04 October 2012 08:58] Report message to a moderator
|
|
| |
Re: org.eclipse.core.runtime bundle Problem [message #933619 is a reply to message #933163] |
Fri, 05 October 2012 07:17   |
Alex Prak Messages: 10 Registered: September 2012 |
Junior Member |
|
|
Hey, thanks for your help!
My Product Definition is definitely based on features. The structure of my Project looks like this:
My Product Project is a Plugin and has Dependencies on my Projects UpdateFeature, p2.rcpupdate and Eclipse Feature org.eclipse.rcp
My Feature-Project UpdateFeature includes all my Plugins (about 10).
My p2.rcpupdate Feature-Project includes some eclipse Plugins for Updating the Product. (equinox plugins...)
For Buckminster I created another Feature-Project named build, which contains UpdateFeature, p2.rcpupdate and org.eclipse.rcp as Included Feature. And at this Project I call site.p2 from Buckminster (in the IDE).
Is my process right?
I use SVN as SCM, but Buckminster dont get the files from there. Actually I try this locally and when this works, Jenkins will get the Files from my SCM.
[Updated on: Fri, 05 October 2012 07:19] Report message to a moderator
|
|
|
Re: org.eclipse.core.runtime bundle Problem [message #933684 is a reply to message #933619] |
Fri, 05 October 2012 08:37   |
Alan Underwood Messages: 37 Registered: October 2010 |
Member |
|
|
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...
Alan
|
|
|
Re: org.eclipse.core.runtime bundle Problem [message #934821 is a reply to message #933684] |
Sat, 06 October 2012 10:32   |
|
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.
Hi
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
<arg value="-repository"/>
<arg value="${repository}"/>
to
<arg value="-repository"/>
<arg value="${repository},http://download.eclipse.org/juno,...and
others..."/>
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
built themselves)
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
--
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
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| |
Goto Forum:
Current Time: Wed Mar 22 07:50:29 GMT 2023
Powered by FUDForum. Page generated in 0.02411 seconds
|