|Re: [jetty-users] bootstrapping jetty-plus from eclipse equinox: classloader issue and suggested fix|
Hugues, Will take a look at the demo project to see the issue (thanks for providing that, makes things much easier).Meanwhile, from the org.mortbay.* packaging, I guess you're using jetty-6. I recommend that you target the jetty-7 releases from eclipse (which are under the org.eclipse package) as jetty-7 has been refactored to be (even more) componentized.
Jetty has been used successfully in osgi containers, so I'll be interested to see why your use case has a problem. Our goal is to make jetty as osgi-friendly as possible, so we're interested in feedback to help improve it. thanks Jan Hugues Malphettes wrote:
Hi there, I am having difficulties using org.mortbay.jetty, org.mortbay.jetty.util, org.mortbay.jetty.plus and org.mortbay.naming together in an osgi container. the issue is that when I start the jetty server and configure it with jetty.xml and jetty-plus.xml from the osgi container, equinox fails. The classloader of the org.mortbay.jetty.server bundle is not able to locate the jetty-plus classes: when jetty tries to load <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item> <Item>org.mortbay.jetty.plus.webapp.Configuration</Item> it fails. The best workaround I am using consists of modifying the manifests of org.mortbay.jetty.server, org.mortbay.jetty.plus and org.mortbay.naming to resolve this. I added to org.mortbay.jetty.server: Eclipse-BuddyPolicy: registered And to the manifests of org.mortbay.jetty.plus and org.mortbay.naming: Eclipse-RegisterBuddy: org.mortbay.jetty.server We could also consider making org.mortbay.jetty.server, org.mortbay.jetty.plus and org.mortbay.naming fragments that target org.mortbay.jetty.server. A bit more osgi compliant. But not many osgi container support fragments yet. Here is a small project to reproduce the issue: http://github.com/hmalphettes/osgi-webapp-simple/tree/master (licensed under the EPL) The first bundle bootstraps jetty. The second one is a bundle that contains a web-application. It works fine because it depends only on jetty, not jetty-plus. Adding jetty-plus's bundle and using jetty-plus in the config will reproduce the issue described above. Let me know if I am missing something or if there is a different way to install jetty' plus bundles in an osgi container. Cheers, Hugues _______________________________________________ jetty-users mailing list jetty-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/jetty-users
-- Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com
Back to the top