Situation
I have a RCP application that gets built with Maven (using Tycho).
When I run the reactor build (the master pom, see below) from the command line using mvn clean build
it builds smoothly and the resulting executable works fine. This also works after cleaning the local Maven repository first.
However, when I include all projects into Eclipse and try to run the project from the product file, I get an error.
Problem
When starting the application the splash screen appears, but then the following error is given:
!SESSION 2013-05-14 11:53:07.109 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_07
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: <irrelevant>
!ENTRY org.eclipse.osgi 2 0 2013-05-14 11:53:09.521
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.522
!MESSAGE Bundle reference:file:/home/debacker/software/jeclipse/plugins/org.apache.lucene_3.5.0.v20120319-2345.jar was not resolved.
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.522
!MESSAGE Missing required bundle org.apache.lucene.misc_[3.5.0,4.0.0).
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.523
!MESSAGE Missing required bundle org.apache.lucene.queries_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.523
!MESSAGE Bundle reference:file:/home/debacker/software/jeclipse/plugins/org.apache.lucene.analysis_2.9.1.v201101211721.jar was not resolved.
!SUBENTRY 2 org.apache.lucene.analysis 2 0 2013-05-14 11:53:09.523
!MESSAGE Missing required bundle org.apache.lucene.core_[2.9.1,3.0.0).
!ENTRY org.eclipse.osgi 2 0 2013-05-14 11:53:09.538
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.538
!MESSAGE Bundle com.mycompany.myproduct.gui.help_1.8.17.qualifier [10] was not resolved.
!SUBENTRY 2 com.mycompany.myproduct.gui.help 2 0 2013-05-14 11:53:09.539
!MESSAGE Missing required bundle org.eclipse.help.ui_3.5.0.
!SUBENTRY 2 com.mycompany.myproduct.gui.help 2 0 2013-05-14 11:53:09.539
!MESSAGE Missing required bundle org.eclipse.help.webapp_3.6.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.539
!MESSAGE Bundle org.apache.lucene_3.5.0.v20120319-2345 [58] was not resolved.
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.540
!MESSAGE Missing required bundle org.apache.lucene.misc_[3.5.0,4.0.0).
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.540
!MESSAGE Missing required bundle org.apache.lucene.queries_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.540
!MESSAGE Bundle org.apache.lucene.analysis_2.9.1.v201101211721 [59] was not resolved.
!SUBENTRY 2 org.apache.lucene.analysis 2 0 2013-05-14 11:53:09.541
!MESSAGE Missing required bundle org.apache.lucene.core_[2.9.1,3.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.541
!MESSAGE Bundle org.eclipse.help.base_3.6.101.v201302041200 [161] was not resolved.
!SUBENTRY 2 org.eclipse.help.base 2 0 2013-05-14 11:53:09.541
!MESSAGE Missing required bundle org.apache.lucene_2.9.0.
!SUBENTRY 2 org.eclipse.help.base 2 0 2013-05-14 11:53:09.541
!MESSAGE Missing required bundle org.apache.lucene.analysis_2.9.0.
!SUBENTRY 2 org.eclipse.help.base 2 0 2013-05-14 11:53:09.542
!MESSAGE Missing optionally required bundle org.eclipse.ant.core_3.2.200.
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.542
!MESSAGE Bundle org.eclipse.help.ui_3.5.201.v20130108-092756 [162] was not resolved.
!SUBENTRY 2 org.eclipse.help.ui 2 0 2013-05-14 11:53:09.542
!MESSAGE Missing required bundle org.eclipse.help.base_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.543
!MESSAGE Bundle org.eclipse.help.webapp_3.6.101.v20130116-182509 [163] was not resolved.
!SUBENTRY 2 org.eclipse.help.webapp 2 0 2013-05-14 11:53:09.543
!MESSAGE Missing required bundle org.eclipse.help.base_[3.5.0,4.0.0).
!ENTRY org.eclipse.osgi 2 0 2013-05-14 11:53:09.574
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.575
!MESSAGE Bundle reference:file:/home/debacker/software/jeclipse/plugins/org.apache.lucene_3.5.0.v20120319-2345.jar was not resolved.
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.575
!MESSAGE Missing required bundle org.apache.lucene.misc_[3.5.0,4.0.0).
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.575
!MESSAGE Missing required bundle org.apache.lucene.queries_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.575
!MESSAGE Bundle reference:file:/home/debacker/software/jeclipse/plugins/org.apache.lucene.analysis_2.9.1.v201101211721.jar was not resolved.
!SUBENTRY 2 org.apache.lucene.analysis 2 0 2013-05-14 11:53:09.576
!MESSAGE Missing required bundle org.apache.lucene.core_[2.9.1,3.0.0).
!ENTRY org.eclipse.osgi 2 0 2013-05-14 11:53:09.583
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.584
!MESSAGE Bundle com.mycompany.myproduct.gui.help_1.8.17.qualifier [10] was not resolved.
!SUBENTRY 2 com.mycompany.myproduct.gui.help 2 0 2013-05-14 11:53:09.584
!MESSAGE Missing required bundle org.eclipse.help.ui_3.5.0.
!SUBENTRY 2 com.mycompany.myproduct.gui.help 2 0 2013-05-14 11:53:09.584
!MESSAGE Missing required bundle org.eclipse.help.webapp_3.6.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.585
!MESSAGE Bundle org.apache.lucene_3.5.0.v20120319-2345 [58] was not resolved.
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.585
!MESSAGE Missing required bundle org.apache.lucene.misc_[3.5.0,4.0.0).
!SUBENTRY 2 org.apache.lucene 2 0 2013-05-14 11:53:09.585
!MESSAGE Missing required bundle org.apache.lucene.queries_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.586
!MESSAGE Bundle org.apache.lucene.analysis_2.9.1.v201101211721 [59] was not resolved.
!SUBENTRY 2 org.apache.lucene.analysis 2 0 2013-05-14 11:53:09.586
!MESSAGE Missing required bundle org.apache.lucene.core_[2.9.1,3.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.586
!MESSAGE Bundle org.eclipse.help.base_3.6.101.v201302041200 [161] was not resolved.
!SUBENTRY 2 org.eclipse.help.base 2 0 2013-05-14 11:53:09.586
!MESSAGE Missing required bundle org.apache.lucene_2.9.0.
!SUBENTRY 2 org.eclipse.help.base 2 0 2013-05-14 11:53:09.587
!MESSAGE Missing required bundle org.apache.lucene.analysis_2.9.0.
!SUBENTRY 2 org.eclipse.help.base 2 0 2013-05-14 11:53:09.587
!MESSAGE Missing optionally required bundle org.eclipse.ant.core_3.2.200.
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.587
!MESSAGE Bundle org.eclipse.help.ui_3.5.201.v20130108-092756 [162] was not resolved.
!SUBENTRY 2 org.eclipse.help.ui 2 0 2013-05-14 11:53:09.588
!MESSAGE Missing required bundle org.eclipse.help.base_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-05-14 11:53:09.588
!MESSAGE Bundle org.eclipse.help.webapp_3.6.101.v20130116-182509 [163] was not resolved.
!SUBENTRY 2 org.eclipse.help.webapp 2 0 2013-05-14 11:53:09.588
!MESSAGE Missing required bundle org.eclipse.help.base_[3.5.0,4.0.0).
!ENTRY org.eclipse.osgi 4 0 2013-05-14 11:53:09.589
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in com.mycompany.myproduct.gui was unable to load class com.mycompany.myproduct.gui.MyProductApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:178)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/equinox/app/IApplication
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.equinox.app.IApplication
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 35 more
An error has occurred. See the log file ...
Notes
Idea
Because it works outside Eclipse, I assume the Eclipse metadata files are somehow corrupt. Or are there more files required then build.properties
, .classpath
and .project
? Are Buckminster-specific files required, even for Maven?
Note: Maven - Update project...
I tried to update the project files using the poms Maven-Update project...
. After doing this, errors appeared throughout the projects.
When looking at svn diff
, only the .classpath
files of the plugins that contained jar
files seemed to be modified (i.e. removed of all valuable info). Therefore, the jar
s could no longer be found and the thing broke down.
This seems to be caused by another bug. Reverting those files back to the original, removed the errors, but didn't solve my initial problem...
When creating product installations, Tycho automatically assembles all transitive dependencies needed so that the product can be executed.
The PDE however requires you to list all (transitive) dependencies in the product file yourself. You can see if you are missing dependencies (for the PDE) by clicking on the "Validate..." button in the upper right corner of the product editor.
Note that making the product PDE-complete may be difficult. Also, it may make your product file hard to maintain, because you won't know which bundles or features are your direct dependencies, and what was only needed to satisfy transitive dependencies. So instead of modifying the product file, you may want to leave the product file as simple as possible, and make the PDE happy via a launch configuration: You'd prime that launch configuration from the product file, but then only add the required dependencies in the launch configuration, and not in the product file.