场合
我有一个使用Maven构建的RCP应用程序(使用Tycho)。
当我使用mvn clean build
从命令行运行reactor构建(主pom,见下文)时,可以顺利构建,结果可执行文件正常。这在首先清理本地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 ...
备注
观
因为它在Eclipse之外工作,我认为Eclipse元数据文件在某种程度上是腐败的。或者需要更多文件然后build.properties
,.classpath
和.project
?是否需要特定于Buckminster的文件,即使对于Maven?
注意:Maven - 更新项目......
我尝试使用poms Maven-Update project...
更新项目文件。执行此操作后,整个项目中出现错误。
查看svn diff
时,只有包含.classpath
文件的插件的jar
文件似乎被修改(即删除了所有有价值的信息)。因此,无法再找到jar
,事情就会崩溃。
这似乎是由另一个bug引起的。将这些文件还原为原始文件,删除了错误,但没有解决我最初的问题......
答案 0 :(得分:2)
创建产品安装时,Tycho会自动组装所需的所有传递依赖项,以便可以执行产品。
然而,PDE要求您自己列出产品文件中的所有(传递)依赖项。您可以通过单击产品编辑器右上角的“验证...”按钮来查看是否缺少依赖项(对于PDE)。
请注意,使产品PDE完成可能很困难。此外,它可能会使您的产品文件难以维护,因为您不会知道哪些捆绑包或功能是您的直接依赖项,以及只需要满足传递依赖项所需的内容。因此,您可能希望保留产品文件尽可能简单,而不是修改产品文件,并通过启动配置使PDE满意:您将从产品文件中启动该启动配置,但只添加所需的依赖项在启动配置中,而不是在产品文件中。