Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 276950

Summary: Transient org.eclipse.equinox.ds "missing constraint" error
Product: [Eclipse Project] PDE Reporter: Michael Sacarny <michael.sacarny>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: christian, curtis.windatt.public, darin.eclipse, manuel.maier, michael.sacarny, mober.at+eclipse, tjwatson, wbprio
Version: 3.5   
Target Milestone: 3.6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Project exhibiting problem none

Description Michael Sacarny CLA 2009-05-19 12:45:42 EDT
Created attachment 136337 [details]
Project exhibiting problem

Build ID: I20090430-2300

Steps To Reproduce:
1) Start with eclipse-SDK-3.5M7-win32.zip and Delta eclipse-3.5M7-delta-pack.zip. I also installed CDT cdt-master-6.0.0-I200905061052.zip but did not include features from it. 
2) Create a plugin com.acme.rcp based on RCP Mail Template.
3) Create a feature com.acme.rcp that refers to this plugin plus these:
  com.ibm.icu
  org.eclipse.ecf
  org.eclipse.ecf.filetransfer
  org.eclipse.ecf.identity
  org.eclipse.ecf.provider.filetransfer
  org.eclipse.ecf.provider.filetransfer.httpclient
  org.eclipse.ecf.provider.filetransfer.httpclient.ssl
  org.eclipse.ecf.provider.filetransfer.ssl
  org.apache.commons.codec
  org.apache.commons.httpclient
  org.eclipse.ecf.ssl
4) Create a _feature-based_ Product Configuration file acme.product with id=com.acme.rcp.product and application=com.acme.rcp.application that has the following feature Dependencies:
  com.acme.rcp
  org.eclipse.rcp
  org.eclipse.equinox.p2.user.ui
  org.eclipse.platform
  org.exclipse.equinox.executable
  org.eclipse.help
5) Export the Product
6) Launch the Product from launcher.exe.
7) Examine the error log and see "missing constraints" error. This will occur each time if -clean is used.


More information:
In an RCP Product based on SDK 3.5M7, there is a one-time "Missing Constraint" Error Log entry at start up indicating o.e.equinox.ds is missing o.e.equinox.internal.util.event (see log below). Both of these plugins, however, are in the Plugins folder.

- I have posted this issue to eclipse.technology.equinox without resolution.
- I have attached a sample project that reproduces the problem, created this way:
1) Start with eclipse-SDK-3.5M7-win32.zip and Delta eclipse-3.5M7-delta-pack.zip. I also installed CDT cdt-master-6.0.0-I200905061052.zip  but did not include components from it. 
2) Create a plugin com.acme.rcp based on RCP Mail Template.
3) Create a feature com.acme.rcp that refers to this plugin plus these:
  com.ibm.icu
  org.eclipse.ecf
  org.eclipse.ecf.filetransfer
  org.eclipse.ecf.identity
  org.eclipse.ecf.provider.filetransfer
  org.eclipse.ecf.provider.filetransfer.httpclient
  org.eclipse.ecf.provider.filetransfer.httpclient.ssl
  org.eclipse.ecf.provider.filetransfer.ssl
  org.apache.commons.codec
  org.apache.commons.httpclient
  org.eclipse.ecf.ssl
4) Create a _feature-based_ Product Configuration file acme.product with id=com.acme.rcp.product and application=com.acme.rcp.application that has the following feature Dependencies:
  com.acme.rcp
  org.eclipse.rcp
  org.eclipse.equinox.p2.user.ui
  org.eclipse.platform
  org.exclipse.equinox.executable
  org.eclipse.help
5) Export the Product
6) Launch the Product from launcher.exe.
7) Examine the error log and see "missing constraints" error. This will occur each time if -clean is used.

- If I start with -console and run diag on o.e.equinox.ds and o.e.equinox.util, they both report "No unresolved constraints".
- The problem did not exist in SDK 3.4.1.
- The error only occurs on the very first start up or when run with -clean option.
- I ran with -debug option and the .options file from org.eclipse.osgi and found the debug entries of the initial failure and eventual plugin resolution:

*** BEGIN RESOLUTION ***
** RESOLVING [org.eclipse.equinox.simpleconfigurator_1.0.100.v20090429-2126] **[org.eclipse.equinox.simpleconfigurator_1.0.100.v20090429-2126] RESOLVED
** RESOLVING [org.eclipse.equinox.transforms.hook_1.0.100.v200905131629] **
** RESOLVING [org.eclipse.equinox.ds_1.1.0.v20090429-1630] **
** IMPORT org.eclipse.equinox.internal.util.event[org.eclipse.equinox.ds_1.1.0.v20090429-1630] failed to resolve
[org.eclipse.equinox.ds_1.1.0.v20090429-1630] NOT RESOLVED
*** END RESOLUTION ***
*** BEGIN RESOLUTION ***
** RESOLVING [org.eclipse.equinox.ds_1.1.0.v20090429-1630] **
** IMPORT org.eclipse.equinox.internal.util.event[org.eclipse.equinox.ds_1.1.0.v20090429-1630] failed to resolve
[org.eclipse.equinox.ds_1.1.0.v20090429-1630] NOT RESOLVED
*** END RESOLUTION ***
Time to load bundles: 47
*** BEGIN RESOLUTION ***
** RESOLVING [org.eclipse.equinox.ds_1.1.0.v20090429-1630] **
** IMPORT org.eclipse.equinox.internal.util.event[org.eclipse.equinox.ds_1.1.0.v20090429-1630] failed to resolve
[org.eclipse.equinox.ds_1.1.0.v20090429-1630] NOT RESOLVED
*** END RESOLUTION ***
:
:
** RESOLVING [org.eclipse.ecf.provider.filetransfer.ssl_1.0.0.v20090429-2045] **
** RESOLVING [org.eclipse.equinox.ds_1.1.0.v20090429-1630] **
[org.eclipse.equinox.util_1.0.100.v20090429-1630] RESOLVED
[org.eclipse.equinox.ds_1.1.0.v20090429-1630] RESOLVED
** RESOLVING [org.eclipse.ui.views_3.4.0.I20090421-0800] **
  - [org.eclipse.ui.views_3.4.0.I20090421-0800] already resolved

So, it looks like the initial failures to resolve are transient. 

Original error log entry:

!ENTRY org.eclipse.equinox.ds 4 0 2009-05-13 17:35:10.998
!MESSAGE !STACK 0
org.osgi.framework.BundleException: The bundle 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:1313)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1297)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:309)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
Comment 1 Manuel Maier CLA 2009-11-05 06:00:11 EST
We are experiencing the same error using the following stuff:

eclipse-SDK-3.5.1-win32.zip
eclipse-3.5.1-delta-pack.zip
cdt-master-6.0.2-I200910090612.zip

and the following error log entry:

!ENTRY org.eclipse.equinox.ds 4 0 2009-11-02 16:31:48.446

!MESSAGE 

!STACK 0

org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; ersion="1.0.0"

	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1313)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1297)

	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:309)

	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)

	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)

	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)

	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)

	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)

	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)

	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Comment 2 Thomas Watson CLA 2009-12-02 10:31:27 EST
I am able to reproduce with steps in comment 0 with 3.5.1 on the Mac.
Comment 3 Thomas Watson CLA 2009-12-02 10:41:24 EST
The problem is the config.ini is including org.eclipse.equinox.ds in the osgi.bundles list and has it starting before simpleconfigurator.  If you edit the configuration/config.ini file to remove the org.eclipse.equinox.ds entry then the error goes away:

osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.101.R35x_v20090807-1100.jar@1\:start

It should only contain simpleconfigurator if p2 is used.  I'm not sure why PDE is including ds on the osgi.bundles list.  The ds bundle is already configured into the p2 bundles.info file and is properly configured with the correct start-level.  Moving to PDE-UI.
Comment 4 Michael Sacarny CLA 2010-02-10 13:31:41 EST
I have confirmed that this bug still occurs with 3.6M5.
Comment 5 Thomas Watson CLA 2010-04-06 09:51:17 EDT
Is this a duplicate of bug 304338.  Could someone try to reproduce this on the latest I-Build?
Comment 6 Curtis Windatt CLA 2010-04-29 11:01:37 EDT

*** This bug has been marked as a duplicate of bug 304338 ***