Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problem exporting Eclipse product
Problem exporting Eclipse product [message #1067047] Fri, 05 July 2013 15:15 Go to next message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
I want to export a standalone product with my DSL editor. I followed the tutorial from http://kthoms.wordpress.com/2010/11/12/setting-up-a-rcp-product-for-a-dsl/, but I'm having problems to get it to work.

When I click "Launch an Eclipse application", I get the following error:

!SESSION Fri Jul 05 12:08:13 BRT 2013 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2013-07-05 12:08:13.553
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	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)



Maybe there is a plugin missing in my DSL feature? If so, I have no idea of which.

When I go to the Run Configurations menu, choose my product configuration, click "Add Required Plug-ins" and then run, it works. So, I must have got most of the configuration right, but can't export the product.
Re: Problem exporting Eclipse product [message #1067075 is a reply to message #1067047] Fri, 05 July 2013 17:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Looks like you are missing org.eclipse.osgi plugin

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem exporting Eclipse product [message #1067082 is a reply to message #1067075] Fri, 05 July 2013 17:57 Go to previous messageGo to next message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
Ok, so I added org.eclipse.osgi to the list of plug-ins in my DSL feature. Now I got another error message. It's pretty big... it starts with

!ENTRY org.eclipse.core.runtime 4 0 2013-07-05 14:50:35.003
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.core.runtime_3.7.0.v20110110 [231]" could not be resolved. Reason: Missing Constraint: Require-Bundle: org.eclipse.equinox.common; bundle-version="[3.5.0,4.0.0)"
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1311)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)


Then, there are a lot of "missing bundles" like this:

!ENTRY org.eclipse.osgi 4 0 2013-07-05 14:50:35.008
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.core.runtime_3.7.0.v20110110.jar/ was not resolved.

!ENTRY org.eclipse.osgi 2 0 2013-07-05 14:50:35.037
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-07-05 14:50:35.037
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.xtext.ui_2.4.0.v201303201134.jar/ was not resolved.
!SUBENTRY 2 org.eclipse.xtext.ui 2 0 2013-07-05 14:50:35.037
!MESSAGE Missing required bundle org.eclipse.ui.ide_3.4.0.
!SUBENTRY 2 org.eclipse.xtext.ui 2 0 2013-07-05 14:50:35.037
!MESSAGE Missing required bundle org.eclipse.core.resources_3.4.0.
!SUBENTRY 2 org.eclipse.xtext.ui 2 0 2013-07-05 14:50:35.038
!MESSAGE Missing required bundle org.eclipse.ui.editors_3.4.0.
!SUBENTRY 2 org.eclipse.xtext.ui 2 0 2013-07-05 14:50:35.038
!MESSAGE Missing required bundle org.eclipse.xtext.xbase.lib_[2.4.0,3.0.0).

(...)


And at the very end:

!ENTRY org.eclipse.osgi 4 0 2013-07-05 14:50:35.087
!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(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	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)


I tried to add org.eclipse.equinox.common to my feature (not sure if that was what I needed), but I got a even bigger error message.
Re: Problem exporting Eclipse product [message #1067083 is a reply to message #1067082] Fri, 05 July 2013 18:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i am not quite sure what you are doing.
you should make use of the validate button in the top right of the product files dependencies tab


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem exporting Eclipse product [message #1067087 is a reply to message #1067083] Fri, 05 July 2013 18:37 Go to previous messageGo to next message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
Thank you for the quick answer. I just checked the validation, and it showed a lot of "Missing Constraint: Import-Package" and "Missing Constraint: Require-Bundle".

For example, under my DSL plugin, there is:

Missing Constraint: Import-Package: org.eclipse.core.filesystem; version="0.0.0"
Missing Constraint: Require-Bundle: org.eclipse.core.resources; bundle-version="0.0.0"

What do these messages actually mean?
Re: Problem exporting Eclipse product [message #1067089 is a reply to message #1067087] Fri, 05 July 2013 18:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
This means that your product
contains features that declare that they need the plugins
org.eclipse.core.filesystem and org.eclipse.core.resources
but you have no feature included that provide these plugins.

btw this is not an xtext specific task so some general reading on eclipse rich client platform might help.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem exporting Eclipse product [message #1067836 is a reply to message #1067089] Wed, 10 July 2013 19:25 Go to previous messageGo to next message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
I set the product configuration to be based on plug-ins instead of features, and it seemed easier to find the dependencies.

Now, I have a problem which apparently is specific to Xtext. When I try to open any file in the exported Eclipse product, I get this message in the editor:

Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml.

And the stack trace:

Toggle Spoiler



This only happens with the exported Eclipse. When I click "Launch an Eclipse application", everything works fine.
Re: Problem exporting Eclipse product [message #1067840 is a reply to message #1067836] Wed, 10 July 2013 19:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i bet the build.properties in one of your plugins contains warnings.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem exporting Eclipse product [message #1067845 is a reply to message #1067840] Wed, 10 July 2013 20:14 Go to previous message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
They didn't, but the error was there! My UI project didn't have the xtend-gen folder set as a source folder. I also changed the runtime environment from Java 1.5 to 1.7 after finding some errors in the log concerning the usage of the @Override annotation. Now it works. Thank you!
Previous Topic:Get the effective type of JvmField in parametrized context
Next Topic:CSS Validation
Goto Forum:
  


Current Time: Tue Apr 23 06:51:42 GMT 2024

Powered by FUDForum. Page generated in 0.03013 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top