繁体   English   中英

基于Luna构建的Eclipse RCP应用程序有时会丢失Windows 10上的捆绑软件

[英]Eclipse RCP application built on Luna sometime misses bundle on Windows 10

我有一个基于Eclipse Luna 4.4构建的Eclipse RCP应用程序。

这是一个托管在GitHub上的开源项目: https : //github.com/andreafeccomandi/bibisco ,可执行文件可以在此处下载。

该应用程序通常在Windows 10上运行良好,但在某些 Windows 10 PC上不会出现此错误:

!SESSION 2016-02-14 13:37:46.274 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -data @none

!ENTRY org.eclipse.equinox.ds 4 0 2016-02-14 13:37:47.563
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.ds_1.4.101.v20130813-1853 [3]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
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)

该应用程序附带了自己的JRE(1.6.0_26),并且config.ini是:

#Product Runtime Configuration File
eclipse.application=bibisco.application
osgi.bundles.defaultStartLevel=4
eclipse.product=bibisco.product
osgi.splashPath=platform:/base/plugins/bibisco
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.equinox.ds@2:start,org.eclipse.core.runtime@start

有任何想法吗?

我查看了该项目的MANIFEST.MF ,可以看到该项目声明了Java 7的用法。

Bundle-RequiredExecutionEnvironment: JavaSE-1.7

但是查看您的日志,似乎您(正在运送和)使用Java 1.6运行该应用程序

java.version=1.6.0_26

因此,我与Modus Tollens有相同的看法,我的理论是,修复Java版本可以解决该错误。

因此,我认为您可以通过使用Java 1.7分发应用程序来解决此问题。 如果这不是一种选择; 您应该在清单中声明使用Java 1.6,并修复相关性。

我认为可以通过在启动配置中设置启动级别来解决此不确定性错误,如下所述: http : //www.vogella.com/tutorials/EclipseRCP/article.html#plugin_startlevels

细节:

日志中的主要错误是:eclipse缺少约束:导入包:org.eclipse.equinox.internal.util.event; 版本=“ 1.0.0”

我在网上找到了一些相关的指针: eclipse论坛上的一个话题eclipse bug上的评论 后一个指针建议通过使用以下设置来解决该错误:

<configurations>
 <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
 <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2"/>
 <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
 <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
 <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="4" />
 <property name="org.eclipse.update.reconcile" value="false" />
</configurations>

这可能是由初始加载阶段中的问题引起的,可以通过更改启动配置并按如下所示设置启动级别来解决:

这些设置与Vogella教程Eclipse RCP>设置启动级别中看到的设置完全相同。

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM