情况
我有一个使用 Maven 构建的 RCP 应用程序(使用 Tycho)。
当我从命令行运行反应堆构建(主 pom,见下文)时,mvn clean build
它会顺利构建并且生成的可执行文件工作正常。这在首先清理本地 Maven 存储库后也有效。
但是,当我将所有项目都包含到Eclipse中并尝试从产品文件中运行项目时,我得到一个错误。
问题
启动应用程序时会出现启动画面,但随后会出现以下错误:
!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 ...
笔记
- 使用嵌入式 Maven 和 CLI 上使用的外部 Maven 安装都会发生这种情况。
- 我在启动之前将产品配置与定义插件同步。
- 将项目输入 Eclipse 后,Package Explorer 中看不到任何错误。
主意
因为它在 Eclipse 之外工作,所以我假设 Eclipse 元数据文件在某种程度上已损坏。或者是否需要更多文件build.properties
,并且?是否需要 Buckminster 特定的文件,即使对于 Maven 也是如此?.classpath
.project
注意:Maven - 更新项目...
我尝试使用 poms更新项目文件Maven-Update project...
。这样做之后,整个项目都出现了错误。
查看时svn diff
,似乎只有.classpath
包含文件的插件文件被修改(即删除了所有有价值的信息)。jar
因此,jar
无法再找到 s 并且事情发生了故障。
这似乎是由另一个错误引起的。将这些文件恢复为原始文件,删除了错误,但没有解决我最初的问题......