简体   繁体   中英

Eclipse RCP application built on Luna sometime misses bundle on Windows 10

I have an Eclipse RCP application built on Eclipse Luna 4.4.

It's an open source project hosted on GitHub: https://github.com/andreafeccomandi/bibisco and executable can be downloaded at here .

The application usually works well in Windows 10, but on some Windows 10 PCs doesn't start with this error:

!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)

The application ships its own JRE (1.6.0_26) and config.ini is:

#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

Any ideas?

I took a look at the MANIFEST.MF of the project and I can see that the project is declaring the usage of Java 7.

Bundle-RequiredExecutionEnvironment: JavaSE-1.7

But looking at your log, seems you're (shipping and) running the application with Java 1.6

java.version=1.6.0_26

So, I share the same observation as Modus Tollens, and my theory is that fixing the Java version can solve the error.

Hence, I think you can solve this just by distributing the application with Java 1.7. If this is not an option; you should declare to use Java 1.6 in the manifest, and fix dependencies consequently.

I think this non-deterministic error will be solved by setting start levels in the launch configuration, as explained here: http://www.vogella.com/tutorials/EclipseRCP/article.html#plugin_startlevels

Details:

the main error in the log is: eclipse Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"

I found some relevant pointers on the web: a topic on eclipse forums , and a comment on an eclipse bug . This latter pointer suggest to solve the error by using the following settings:

<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>

This might be caused by an issue in the initial loading phase, that can be solved by changing the launch configuration and setting the start levels as follows:

Which are exactly the same settings as you can see in the Vogella tutorial Eclipse RCP > set start levels .

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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