Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » org.eclipse.core.runtime bundle Problem
icon5.gif  org.eclipse.core.runtime bundle Problem [message #916018] Tue, 18 September 2012 08:09 Go to next message
Alex Prak is currently offline Alex Prak
Messages: 10
Registered: September 2012
Junior Member
Hey,
I build my RCP application with Buckminster. (build, #site.p2, #create.product).
When Jenkins tries to create the product, I get following error:

[ant] D:\USERDATA\tq8796r\Jenkins\workspace\test\trunk\de.bsp.tdb.dependencies\lib\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar
[ant] file:/D:/USERDATA/tq8796r/Jenkins/workspace/test/buckminster.output/de.bsp.tdb.UpdateFeature_3.5.8-eclipse.feature/site.p2/
[ant] D:\USERDATA\tq8796r\Jenkins\workspace\test\buckminster.output\de.bsp.tdb.UpdateFeature_3.5.8-eclipse.feature\product.win32.win32.x86

ERROR: org.eclipse.core.runtime.CoreException: D:\USERDATA\tq8796r\Jenkins\workspace\test\trunk\de.bsp.tdb.UpdateFeature\product.ant:22: Java returned: 13
org.eclipse.core.runtime.CoreException: D:\USERDATA\tq8796r\Jenkins\workspace\test\trunk\de.bsp.tdb.UpdateFeature\product.ant:22: Java returned: 13
	at org.eclipse.buckminster.ant.AntRunner.handleInvocationTargetException(AntRunner.java:167)
	at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:322)
	at org.eclipse.buckminster.ant.actor.AntActor.internalPerform(AntActor.java:254)
	at org.eclipse.buckminster.core.actor.AbstractActor.perform(AbstractActor.java:186)
	at org.eclipse.buckminster.core.internal.actor.PerformManager$DirectActionInvocation.execute(PerformManager.java:143)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.internalPerform(PerformManager.java:454)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:293)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:305)
	at org.eclipse.buckminster.core.commands.Perform.internalRun(Perform.java:108)
	at org.eclipse.buckminster.core.commands.WorkspaceCommand.run(WorkspaceCommand.java:91)
	at org.eclipse.buckminster.cmdline.AbstractCommand.basicRun(AbstractCommand.java:200)
	at org.eclipse.buckminster.cmdline.Headless.run(Headless.java:317)
	at org.eclipse.buckminster.cmdline.Headless.run(Headless.java:136)
	at org.eclipse.buckminster.cmdline.Headless.start(Headless.java:156)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: D:\USERDATA\tq8796r\Jenkins\workspace\test\trunk\de.bsp.tdb.UpdateFeature\product.ant:22: Java returned: 13
	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
	at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:318)
	... 25 more







Here is my Logfile:

!ENTRY org.eclipse.osgi 4 0 2012-09-18 11:26:38.612
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)




Buckminster Director config.ini in the install directory:


#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Sat Sep 01 15:13:47 CEST 2012
eclipse.p2.profile=Director
osgi.instance.area.default=@user.home/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.8.0.v20120529-1548.jar
equinox.use.ds=true
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.300.v20110815-1744.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.equinox.p2.director.product
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=@config.dir/../p2
eclipse.application=org.eclipse.equinox.p2.director




The org.eclipse.core.runtime_3.7.0_.... jar is in my dependencies project, which is coverd by my RMAP File.

Did somebody know the problem or have any idea?
Re: org.eclipse.core.runtime bundle Problem [message #916548 is a reply to message #916018] Wed, 19 September 2012 02:37 Go to previous messageGo to next message
Alex Prak is currently offline Alex Prak
Messages: 10
Registered: September 2012
Junior Member
When I start the director manually, I get the following error:



....
....
....
!ENTRY org.eclipse.update.configurator 4 0 2012-09-18 14:22:33.840
!MESSAGE Could not install bundle plugins/org.eclipse.equinox.util_1.0.400.v20120522-2049.jar Bundle "org.eclipse.equinox.util" version "1.0.400.v20120522-2049" has already been installed from: reference:file:plugins/org.eclipse.equinox.util_1.0.400.v20120522-2049.jar

!ENTRY org.eclipse.update.configurator 4 0 2012-09-18 14:22:33.844
!MESSAGE Could not install bundle plugins/org.eclipse.update.configurator_3.3.200.v20120523-1752.jar Bundle "org.eclipse.update.configurator" version "3.3.200.v20120523-1752" has already been installed from: reference:file:plugins/org.eclipse.update.configurator_3.3.200.v20120523-1752.jar

!ENTRY org.eclipse.update.configurator 4 0 2012-09-18 14:22:33.845
!MESSAGE Could not install bundle plugins/org.sat4j.core_2.3.0.v20110329.jar Bundle "org.sat4j.core" version "2.3.0.v20110329" has already been installed from: reference:file:plugins/org.sat4j.core_2.3.0.v20110329.jar

!ENTRY org.eclipse.update.configurator 4 0 2012-09-18 14:22:33.846
!MESSAGE Could not install bundle plugins/org.sat4j.pb_2.3.0.v20110329.jar Bundle "org.sat4j.pb" version "2.3.0.v20110329" has already been installed from: reference:file:plugins/org.sat4j.pb_2.3.0.v20110329.jar

!ENTRY org.eclipse.equinox.p2.director 4 1 2012-09-18 14:22:35.107
!MESSAGE Cannot complete the install because one or more required items could not be found.
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2012-09-18 14:22:35.107
!MESSAGE Software being installed: Product Plug-in 3.5.8.201209181108 (de.bsp.tdb.product 3.5.8.201209181108)
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2012-09-18 14:22:35.107
!MESSAGE Missing requirement: Core Plug-in 3.5.8.201209181107 (de.bsp.tdb.common.core 3.5.8.201209181107) requires 'bundle org.eclipse.core.runtime [3.7.0,4.0.0)' but it could not be found




He founds org.sat4j.pb... jar. Then he searches the org.eclipse.core.runtime jar, which is located in the same directory. But he could not find the jar ?!?!

Something is wrong with the org.eclipse.core.runtime.
Somebody have an idea?
Re: org.eclipse.core.runtime bundle Problem [message #925005 is a reply to message #916548] Thu, 27 September 2012 05:58 Go to previous messageGo to next message
Matthew Webber is currently offline 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 #932002 is a reply to message #925005] Wed, 03 October 2012 14:34 Go to previous messageGo to next message
Alan Underwood is currently offline Alan Underwood
Messages: 37
Registered: October 2010
Member
If you edit the product.ant file, and change the java call to the director application...
<java jar="${equinox.launcher.jar}" fork="true" failonerror="true" >

Add output settings so you can see why director failed...
<java jar="${equinox.launcher.jar}" fork="true" failonerror="true" outputproperty="${buckminster.output.root}/director.out" errorproperty=""${buckminster.output.root}/director.err" >


Now when you get the annoying "java returned 13" error, have a look in those files to see why director failed.

Alan
Re: org.eclipse.core.runtime bundle Problem [message #932510 is a reply to message #916018] Thu, 04 October 2012 02:56 Go to previous messageGo to next message
Alex Prak is currently offline Alex Prak
Messages: 10
Registered: September 2012
Junior Member
Hey, thanks for your help.

I already solved this problem. Now Buckminster run through the site.p2 process and creates all the folders with the bundles and so on.

But when I run the director, I dont get enough files to run my product. When I run the exe I get an error. The problem is, that the site.p2 folder dont have

- (org.eclipse.rcp_root_3.7.2) in the binary folder and
- (org.eclipse.rcp_3.7.2.....) in the features folder.

But in the plugins folder exists the org.eclipse.rcp_3.7.2..jar and org.eclipse.rcp_3.7.2...source.jar


Org.eclipse.rcp is a Dependencie of my Product-Project. I already tried several things like adding RCP to my target platform (software-site) or adding org.eclipse.rcp as a includeFeature to my Build-Project. Nothing helped...


Somebody has an idea how i can get the 2 files into the 2 folders when I create the site.p2 with Buckminster in the Eclipse IDE?
Re: org.eclipse.core.runtime bundle Problem [message #932594 is a reply to message #932510] Thu, 04 October 2012 04:53 Go to previous messageGo to next message
Alex Prak is currently offline 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 04:58]

Report message to a moderator

Re: org.eclipse.core.runtime bundle Problem [message #933163 is a reply to message #932594] Thu, 04 October 2012 15:53 Go to previous messageGo to next message
Alan Underwood is currently offline Alan Underwood
Messages: 37
Registered: October 2010
Member
I'm not sure of the problem. Could it be that you have defined your .product to be specified by plug-ins rather than features? Conventional wisdom is that your .product should be defined by features and should contain one top-level feature. This feature then contains all your component features and/or plug-ins and so on. So try checking your .product definition. It may explain why you have no features/ folder.

As for the qualifier, do you need to specify a format with it? and are you providing the properties file with the qualifier specification to the buckminster task?
#qualifier.replacement.*=generator:lastRevision
#generator.lastRevision.format=r{0,number,00000}

I don't know if it matters what SCM system you are using.

Just some ideas...
Re: org.eclipse.core.runtime bundle Problem [message #933619 is a reply to message #933163] Fri, 05 October 2012 03:17 Go to previous messageGo to next message
Alex Prak is currently offline 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 03: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 04:37 Go to previous messageGo to next message
Alan Underwood is currently offline 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 06:32 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1307
Registered: July 2009
Senior Member
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
Re: org.eclipse.core.runtime bundle Problem [message #938907 is a reply to message #934821] Wed, 10 October 2012 05:04 Go to previous message
Alan Underwood is currently offline Alan Underwood
Messages: 37
Registered: October 2010
Member
Lorenzo

I look at it this way:

If I wanted my feature to include target platform features and plug-ins because it makes sense to do so, then I add those target platform features as part of my feature. This means that if I publish the p2 site for my feature it will include those target features and plug-ins. If I want to produce a product from my feature then I only point director at my p2 site.

If I don't want to to include target platform features and plug-ins, then I don't; but if I depend on them for a product I produce from my feature then I will need to point director at the p2 sites that contain those target platform features and plug-ins as well as the p2 site for my feature.

Therefore I think it depends on what you are making your feature and product for. I think most eclipse features do not include the target platform f's & p's because they are to be consumed as p2 sites for installing into a p2 product. However, if you are making your feature for use mainly to generate a product, it may make sense to include the dependencies from the target platform in your feature so everything is in one p2 site. This makes it slightly easier to create the product, as you only have to specify one p2 repository to director, but it also means you have to make sure you don't miss any dependencies from your features or they won't be in the p2 site and director will fail.

Another area to consider is p2 updating. What site or sites do you want to update your application from and how do you configure it?

Not sure if that helps...

Alan
Previous Topic:Bring back svnkit16! :-)
Next Topic:Headless Build on OSX fails with Unbound classpath container: 'JRE System Library [JavaSE-1.6]'
Goto Forum:
  


Current Time: Tue Jul 29 06:51:10 EDT 2014

Powered by FUDForum. Page generated in 0.02578 seconds