Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Hello!
One common complaint with OSGi implementations is that requirements issues often produce unreadable error messages. In Eclipse Equinox, requirements messages are carefully formatted and this tends to improve readability a lot. Consider this Felix error message:
ERROR: Bundle org.sakaiproject.nakamura.world [76] Error startingfile:bundles/org.sakaiproject.nakamura.world_1.4.0.SNAPSHOT.jar(org.osgi.framework.BundleException: Unresolved constraint in bundleorg.sakaiproject.nakamura.world [76]: Unable to resolve 76.0: missingrequirement [76.0] osgi.wiring.package;(&(osgi.wiring.package=javax.servlet)(version>=3.0.0))) 11.07.2012 17:01:43.297 *ERROR* [FelixDispatchQueue]org.sakaiproject.nakamura.world FrameworkEvent ERROR(org.osgi.framework.BundleException: Unresolved constraint in bundleorg.sakaiproject.nakamura.world [76]: Unable to resolve 76.0: missingrequirement [76.0] osgi.wiring.package;(&(osgi.wiring.package=javax.servlet)(version>=3.0.0))) org.osgi.framework.BundleException: Unresolved constraint in bundleorg.sakaiproject.nakamura.world [76]: Unable to resolve 76.0: missingrequirement [76.0] osgi.wiring.package;(&(osgi.wiring.package=javax.servlet)(version>=3.0.0))
Now consider this similar message from Equinox:
org.osgi.framework.BundleException: Could not resolve module: z.resolveError [9] Unresolved requirement: Import-Package: unresolved.exporter -> Export-Package: unresolved.exporter; bundle-symbolic-name="z.unresolved.exporter"; bundle-version="1.0.0.qualifier"; version="0.0.0" z.unresolved.exporter [10] Unresolved requirement: Import-Package: does.not.exist
According to Thomas Watson, this is achieved by "indenting the chains until we get to a requirement that has no available candidates".