状況
Maven (Tycho を使用) でビルドされる RCP アプリケーションがあります。
コマンドラインからリアクター ビルド (マスター 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 メタデータ ファイルが何らかの形で破損していると思われます。または、それ以上のファイルが必要ですか? Maven の場合でも、Buckminster 固有のファイルは必要ですか?build.properties
.classpath
.project
注: Maven - プロジェクトの更新...
poms を使用してプロジェクト ファイルを更新しようとしましたMaven-Update project...
。これを行った後、プロジェクト全体でエラーが発生しました。
を見ると、ファイルを含むプラグインsvn diff
のファイルだけが変更されているように見えました (つまり、すべての重要な情報が削除されました)。そのため、sが見つからなくなり、物が壊れてしまいました。.classpath
jar
jar
これは別のバグが原因のようです。これらのファイルを元に戻し、エラーを取り除きましたが、最初の問題は解決しませんでした...