1 Reply Latest reply on Jul 28, 2011 4:23 PM by Raj Tiwari

    ReSTEasy stopped working JBoss 6 -> JBoss 7

    Raj Tiwari Newbie

      Folks,

      I have a very simple test app that uses a @Path class to invoke ReST-based functionality. My simple app invokes my code when run in JBoss 6. However, the same app when run in JBoss 7 returns an HTTP 404 error.

       

      Here is my class:

      {code}

      @Path( "/users" )

      public class UserManager

      {

          /**

           * Queries existence of a user.

           * @param sUserId

           * @return HTTP OK if user exists and NOT_FOUND if user does not exist

           */

          @HEAD@Path( "/{userid}" )

          public Response queryUserExists( @PathParam( "userid" )final String sUserId )

          {

              final boolean bUserExists = userManager.queryUserExists( sUserId );

              final Response retval;

              if( bUserExists )

              {

                  retval = Response.status( Response.Status.OK ).build();

              }

              else

              {

                  retval = Response.status( Response.Status.NOT_FOUND ).build();

              }

       

              return retval;

          }

       

       

          @EJB

          private UserManagerLocal userManager;

      }

      {code}

       

      The URL I used to make a HEAD request is: http://localhost:8080/MyTestAppWeb/users/foo

      I have NO ReSTEASY config in my server.xml. I am using the container's default config.