Hi Vincent, I've just fixed the NPE in SVN trunk. I hope that your setup will now work. If not, let us know. You could also open a bug report and attach a reproducible sample to it.
Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Vincent Ricard [mailto:[EMAIL PROTECTED] Envoyé : mardi 12 août 2008 11:04 À : [email protected] Objet : NPE with Wadl and ServerServlet Hi, I'm testing the wadl support and trying to run restlet in a servlet container (from the svn source, r3631). I tried two solutions: - just declare the ServerServlet and create a restlet.xml (see the attached file) - create a custom component inheriting from WadlComponent and declare it in the web.xml (as described in the ServerServlet javadoc) with the following constructor: public RestletComponent() { super("clap://class/app.wadl"); } (This is my first attempt with restlet, so i maybe forget something) It seems that "wadlRep.getApplication()" returns null. In the both cases, i get a NPE: java.lang.NullPointerException at org.restlet.ext.wadl.WadlApplication.<init>(WadlApplication.java:170) at org.restlet.ext.wadl.WadlComponent.attach(WadlComponent.java:157) at org.restlet.ext.wadl.WadlComponent.attach(WadlComponent.java:142) at org.restlet.ext.wadl.WadlComponent.attach(WadlComponent.java:171) at org.restlet.ext.wadl.WadlComponent.<init>(WadlComponent.java:118) at RestletComponent.<init>(RestletComponent.java:7) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces sorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc torAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at com.noelios.restlet.ext.servlet.ServerServlet.createComponent(ServerServlet. java:396) at com.noelios.restlet.ext.servlet.ServerServlet.getComponent(ServerServlet.jav a:643) at com.noelios.restlet.ext.servlet.ServerServlet.init(ServerServlet.java:722) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11 39) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3956) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Best regards, -- Vincent Ricard

