Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1824

NullPointer exception in ResteasyWadlWriter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.5.1.Final, 4.0.0.Beta3
    • 3.0.19.Final, 3.1.0.Final, 3.5.0.Final
    • jaxrs
    • 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.

              pjurak Petr Jurak (Inactive)
              christianh_jira Christian Hufgard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: