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

Bug 377510

Summary: Resolver gives false positives on conflicting constraints from a fragment
Product: [Eclipse Project] Equinox Reporter: Thomas Watson <tjwatson>
Component: FrameworkAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gunnar
Version: 3.8.0 Juno   
Target Milestone: Juno M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Thomas Watson CLA 2012-04-24 09:06:36 EDT
See bug 377433.  PDE and PDE-Builds usage of the resolver sets multiple execution environments which results an extra check to see if an import can be satisfied by an export coming from the system bundle for a particular execution environment set by the bundle with the import-package.

Unfortunately this check causes the check for conflicting constraints from fragments to produce false positives if the fragments Bundle-RequiredExecutionEnvironment is not the same as its host bundle.  The following lines (154-156) from ImportPackageSpecification are problematic:

		// finally check the ee index
		if (((BundleDescriptionImpl) getBundle()).getEquinoxEE() < 0)
			return true;

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/tree/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java

The cause of the issue in bug 377433 is because the fragments org.eclipse.persistence.nosql and org.eclipse.persistence.oracle have Bundle-RequiredExecutionEnvironment headers with the value J2SE-1.5 while their host org.eclipse.persistence.core has a value of JavaSE-1.6.
Comment 1 Thomas Watson CLA 2012-04-25 11:49:27 EDT
Need to look at this for M7.