-
Bug
-
Resolution: Done
-
Major
-
3.0.19.Final, 3.1.0.Final, 3.5.0.Final
-
None
I try go get a wadl from the ResteasyWadlServlet. When accessing the URL I get an exeption:
java.lang.NullPointerException org.jboss.resteasy.wadl.ResteasyWadlWriter.getStringWriter(ResteasyWadlWriter.java:36) org.jboss.resteasy.wadl.ResteasyWadlWriter.getBytes(ResteasyWadlWriter.java:26) org.jboss.resteasy.wadl.ResteasyWadlServletWriter.writeWadl(ResteasyWadlServletWriter.java:32) org.jboss.resteasy.wadl.ResteasyWadlServletWriter.writeWadl(ResteasyWadlServletWriter.java:45) org.jboss.resteasy.wadl.ResteasyWadlServlet.service(ResteasyWadlServlet.java:55) javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
The NullPointerException occurs because this code in the ResteasyWadlServlet returns null:
Map<String, ResteasyDeployment> deployments = (Map<String, ResteasyDeployment>) servletContext.getAttribute(ResteasyContextParameters.RESTEASY_DEPLOYMENTS);
As soon as I access the actual rest services, this exception disappears and the correct wadl is returned.
- is related to
-
RESTEASY-1835 Eager fetch deployments in ResteasyWadlServlet
- Open