| Summary: | Unable to run Jetty OSGi when -Dosgi.compatibility.bootdelegation=false | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Dmytro Pishchukhin <dmytro.pishchukhin> |
| Component: | osgi | Assignee: | Hugues Malphettes <hmalphettes> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | hmalphettes, jetty-inbox, joakim.erdfelt |
| Version: | 7.1.4 | ||
| Target Milestone: | 7.2.0.RC0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Dmytro Pishchukhin
Thanks a lot Dmytro for finding the root cause of this issue. I am the maintainer for these jars both in eclipse-orbit (javax.servlet.jsp.glassfish) and for jetty. For jetty we use Bnd for most jars. I actually consciously removed all imports of packages provided by the profile JavaSE5: I assumed that bootdelegation was always true and thought that in fact this was the OSGi standard behavior. Let's keep track of these here and I'll be fixing them. Import those packages with the version 0.0.0 explicitly. Let me know if I am missing something. Is this issue blocking you or can you enable osgi.compatibility.bootdelegation ? It seems that felix and knoplerfish are supporting that property? (In reply to comment #1) > Thanks a lot Dmytro for finding the root cause of this issue. > I am the maintainer for these jars both in eclipse-orbit > (javax.servlet.jsp.glassfish) and for jetty. > > For jetty we use Bnd for most jars. > I actually consciously removed all imports of packages provided by the profile > JavaSE5: I assumed that bootdelegation was always true and thought that in fact > this was the OSGi standard behavior. > > Let's keep track of these here and I'll be fixing them. > Import those packages with the version 0.0.0 explicitly. > > Let me know if I am missing something. > > Is this issue blocking you or can you enable osgi.compatibility.bootdelegation > ? > It seems that felix and knoplerfish are supporting that property? Hugues, I'm not sure that Felix and Knopflerfish support this property, because I did not find any information about the property in OSGi spec. I think that this is Equinox specific property. This issue is blocking for me, because my project runs outside Eclipse launcher and could be run on Felix and Knopflerfish (or any R4 framework). Standard OSGi behavior is osgi.compatibility.bootdelegation=false (details here: http://wiki.eclipse.org/Equinox_Boot_Delegation) Do not use any versions for packages that are provided by JRE (org.xml.sax.*, org.w3c.dom.*). Those packages are exported by system bundle with default version value (0.0.0). Can I test your fixes before any new version release? I can find traces of "osgi.compatibility.bootdelegation"inf felix (http://felix.apache.org/site/using-the-osgi-compliance-tests.html) and knopflerfish (http://www.knopflerfish.org/releases/current/docs/release_notes.html). I will update this bug with a snapshot build of jetty-osgi as I am fixing those bugs. Glad to have someone to help testing it. (In reply to comment #3) > I can find traces of "osgi.compatibility.bootdelegation"inf felix > (http://felix.apache.org/site/using-the-osgi-compliance-tests.html) and > knopflerfish > (http://www.knopflerfish.org/releases/current/docs/release_notes.html). Sorry for the extra email. In my understanding configuring an R4 implementation with org.osgi.framework.bootdelegation=* will do the trick. Just a workaround really. (In reply to comment #4) > (In reply to comment #3) > > I can find traces of "osgi.compatibility.bootdelegation"inf felix > > (http://felix.apache.org/site/using-the-osgi-compliance-tests.html) and > > knopflerfish > > (http://www.knopflerfish.org/releases/current/docs/release_notes.html). > Sorry for the extra email. > In my understanding configuring an R4 implementation with > org.osgi.framework.bootdelegation=* will do the trick. > Just a workaround really. This is a workaround, but we cannot use this property in our project. Usage of the property is not a good OSGi smell :) I have committed the changes to org.apache.jasper.glassfish org.apache.jasper.glassfish__2.1.0.v201006171119 will fix those missing imports. Reviewing the other jetty bundles. I have committed the changes to the configuration of Bnd for the generation of the jetty's bundle manifest to import the non java.* packages with a version of "0.0.0" Here is the thread for your reference discussing how to import those packages: http://dev.eclipse.org/mhonarc/lists/orbit-dev/msg01875.html jetty depends on org.xml.sax, org.w3c, javax.xml, javax.net, javax.naming, javax.transaction and a couple more. Most of these imports are used when the optional jetty libraries are in use. They are all imported with the version "0.0.0" for the next release. Committed after a small sanity check with Joakim. revision 2037. Will be release after 7.1.4 Sorry for the mismanipulation, please disregard comment #5 Fixed for jetty-7.1.5 Please note that jetty-plus published on the maven repository has its osgi manifest broken: bug 319034 The EclipseRT Web Starter Kit distribution for 7.1.5 is fine. |