2008/11/23 Peter Gardfjäll <[EMAIL PROTECTED]> > Hi all, > > I have been banging my head against a really weird class loading problem. > The particular problem I have manifests itself when I, via Spring-DM, try > to > wire up a bundle with a reference to the HttpService service. > This fails with a java.lang.NoClassDefFoundError: javax/servlet/Servlet > error. > > Now, the weird part about this is that it seems to be the particular > combination of Spring-DM and Felix's org.osgi.compendium-1.2.0.jar bundle > that don't play nicely together. > The fact is that if I replace the org.osgi.compendium-1.2.0.jar bundle with > the "corresponding" Eclipse bundle > (org.eclipse.osgi.services_3.1.200.v20070605.jar) it works fine, > no exception is thrown and everything is wired up correctly. > This seems strange to me, given that these bundles look so much alike. > > I'm not sure whether the root cause of this is a problem with Felix's > compendium bundle or Spring-DM's extender bundle. > Maybe it would be more appropriate to direct this problem to Spring-DM's > forum, but since the Felix compendium bundle is the difference between a > working and a broken application I thought I would start out on this list. > > I have set up a minimal workspace with a Felix runtime project that can be > launched easily to reproduce the problem. > If someone would be willing to look into this problem I am more than happy > to send over a workspace zip file. > > I hope someone can shed some light on this matter. >
what version of Felix are you running this on? there is a slight difference between these two bundles, in that the Equinox version has both a dynamic import and an optional import for javax.servlet, whereas the Felix version only has the dynamic import this could explain things because there was a recent bug found in Felix relating to resolution of dynamic imports - so you might want to test this against the current trunk to see if the problem still exists otherwise open a JIRA issue and attach the testcase: http://issues.apache.org/jira/browse/FELIX HTH regards, Peter > -- Cheers, Stuart

