| Summary: | Odd resolution reports for BNC failures | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Jeff McAffer <jeffmcaffer> | ||||||
| Component: | Framework | Assignee: | Thomas Watson <tjwatson> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 3.7 | ||||||||
| Target Milestone: | Juno M1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Jeff McAffer
Created attachment 196168 [details]
example case that shows the problem
attached is a simple plugin project that has a bnc and platform filter. When run on a system that does not match (e.g., I ran this on a Mac but the bnc and filter identified windows) the first time you get,
!MESSAGE Bundle bnc.test_1.0.0.qualifier [1] was not resolved.
!SUBENTRY 2 bnc.test 2 0 2011-05-19 15:44:32.739
!MESSAGE Missing host Bundle-NativeCode_0.0.0.
(note the "Bundle-NativeCode" in the last message)
The second time you run (without -clean or clearing the config area) you get
!MESSAGE Bundle bnc.test_1.0.0.qualifier [1] was not resolved.
!SUBENTRY 2 bnc.test 2 0 2011-05-19 15:45:44.752
!MESSAGE Missing host null_0.0.0.
(note the "null" in the last message)
No where in the log output do you get anything talking about the platform filters not matching.
To help in running the project has a .launch file. You should just be able to run that.
If you then delete the BNC line in the manifest you get a helpful message saying that that the platform filter did not match but...
- that log entry is duplicated
- the log alos contains the somewhat distracting stacktrace as follows
!ENTRY bnc.test 4 0 2011-05-19 15:52:18.181
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "bnc.test_1.0.0.qualifier [2]" could not be resolved. Reason: Platform filter did not match: (osgi.os="win32")
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1311)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
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)
That trace is not adding any value and likely distracts log readers from the real problems.
Created attachment 196249 [details]
patch
Thi issue is that the MessageHelper.getResolutionFailureMessage defaults to a HostSpecification for everything other than ImportPackageSpecification and BundleSpecification which is not correct. This patch handles NativeCodeSpecification and GenericSpecification.
This patch simply fixes this part of the bug. Nothing is done to consider the Eclipse-PlatformFilter first. IMO both are valid reasons for the bundle to be unresolved. Not sure why Eclipse-PlatformFilter would take priority over Bundle-NativeCode.
Patch released. |