Hi Eneko, I've found that the order the bundles are loaded in seems to be important somehow too. I haven't yet narrowed it down definitively though, but I think something like loading com.noelios then org.restlet then my bundle did the trick. In Equinox I had to delete the bundles and re-add them if they failed to start automatically in the right order.
HTH, Michael. On Fri, Jan 9, 2009 at 12:05 AM, <[email protected]> wrote: > Hello : > > I am having the same problem trying to integrate restlets with knopflefish > OSGi. Bundles start ok, they seem to start the server as well, but when I do > any GET or POST requests to the restful server, a big CNFE appears: > > SEVERE: Unable to create the HTTP server converter > java.lang.ClassNotFoundException: com.noelios.restlet.http.HttpServerConverter > at > org.knopflerfish.framework.BundleClassLoader.findClass(BundleClassLoader.java:262) > at > org.knopflerfish.framework.BundleClassLoader.loadClass(BundleClassLoader.java:322) > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at org.restlet.util.Engine.loadClass(Engine.java:288) > at > com.noelios.restlet.http.HttpServerHelper.getConverter(HttpServerHelper.java:105) > at > com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:145) > at > com.noelios.restlet.ext.grizzly.HttpParserFilter.execute(HttpParserFilter.java:78) > at > com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) > at > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67) > at > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56) > at > com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325) > at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184) > Jan 8, 2009 2:28:59 PM com.noelios.restlet.http.HttpServerHelper handle > WARNING: Error while handling an HTTP server call: > Jan 8, 2009 2:28:59 PM com.noelios.restlet.http.HttpServerHelper handle > INFO: Error while handling an HTTP server call > java.lang.NullPointerException > at > com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:145) > at > com.noelios.restlet.ext.grizzly.HttpParserFilter.execute(HttpParserFilter.java:78) > at > com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) > at > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67) > at > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56) > at > com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325) > at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184) > > > > I am not sure if it is a bug, or some issue related with OSGi integration, > but I have tried using the solution Michael exposed, using > Engine.setUserClassLoader..., but didn't work at all. > > Any suggestion please? Thanks in advance. > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1011732 >

