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

NullPointerException in JSAPI servlet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 2.3-RC1
    • 2.2.1
    • jaxrs

      From discussion thread http://community.jboss.org/thread/170373

      Folk,
      I have three classes that invoke JAX-RS functionality. Partial stack trace in server logs is:

      10:25:28,364 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DTalkWeb]] (MSC service thread 1-4) Servlet /DTalkWeb threw load() exception: java.lang.NullPointerException
      at org.jboss.resteasy.jsapi.ServiceRegistry.scanRegistry(ServiceRegistry.java:69) [resteasy-jsapi-2.2.1.GA.jar:]
      at org.jboss.resteasy.jsapi.ServiceRegistry.<init>(ServiceRegistry.java:63) [resteasy-jsapi-2.2.1.GA.jar:]
      at org.jboss.resteasy.jsapi.JSAPIServlet.scanResources(JSAPIServlet.java:76) [resteasy-jsapi-2.2.1.GA.jar:]
      at org.jboss.resteasy.jsapi.JSAPIServlet.init(JSAPIServlet.java:38) [resteasy-jsapi-2.2.1.GA.jar:]

      The first few lines of the JAX-RS classes look like this:

      @ApplicationPath( "/api" )
      @Path( "/users" )
      public class EndUserUiService extends Application
      {
      /**

      • Queries existence of a user.
      • @param sUserId
      • @return HTTP OK if user exists and NOT_FOUND if user does not exist
      • @throws NamingException
        */
        @HEAD
        @Path( "/ {userid}

        " )
        public Response queryUserExists( @PathParam( "userid" )final String sUserId ) throws NamingException
        {
        ...

      @ApplicationPath( "/api" )
      @Path("/organizations")
      public class OrganizationUiService
      {
      ...
      }

      @ApplicationPath( "/api" )
      @Path( "/adresses" )
      public class AdressUiService
      {
      ...
      }

            patriot1burke@gmail.com Bill Burke (Inactive)
            rituraj_tiwari_jira Raj Tiwari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: