title: Could not find resource for path in JAX-RS with RESTEasy
body: <p>I created a maven project with archetype as maven-archetype-webapp, and then for exposing my application as a rest webservice i'm using RestEasy, however after implementin the rest application i'm unable to acces the URL created by me.
  Please guide me in what i'm doing incorrectly. Thanks for reading the question.</p>
  
  <p>My UserManagementController is as below : </p>
  
  <pre><code>package com.restimplement.btl.pl.controller;
  
  import javax.ws.rs.DefaultValue;
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.PathParam;
  import javax.ws.rs.QueryParam;
  import javax.ws.rs.core.Response;
  
  import com.restimplement.btl.pl.dao.UserDao;
  
  @Path(value="/UserManagement")
  public class UserManagementController {
  
      @GET
      @Path("/{pathParameter}")
      public Response getAllUsers( @PathParam("pathParameter") String pathParameter,
              @DefaultValue("Nothing to say") @QueryParam("queryParameter") String queryParameter)
      {
          UserDao userdao = new UserDao();
          System.out.println("able to visit  user add");
          String response = "details from: "+userdao.findObject();
          return Response.status(200).entity(response).build();
      }
  
  }
  </code></pre>
  
  <p>My MyRestWS.java is as below :</p>
  
  <pre><code>package com.restimplement.btl.pl.controller;
  
  import java.util.HashSet;
  import java.util.Set;
  import javax.ws.rs.core.Application;
  
  public class MyRestWS extends Application{
  
      private Set&lt;Object&gt; singletons = new HashSet&lt;Object&gt;();
  
      public MyRestWS() {
          singletons.add(new UserManagementController());
      }
  }
  </code></pre>
  
  <p>My web.xml is as below :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      id="WebApp_ID" version="3.0"&gt;
      &lt;display-name&gt;BTL_PL&lt;/display-name&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;resteasy-servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/btlservice/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;!-- this should be the same URL pattern as the servlet-mapping property --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;resteasy.servlet.mapping.prefix&lt;/param-name&gt;
          &lt;param-value&gt;/btlservice&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;resteasy-servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
          &lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
              &lt;param-value&gt;com.restimplement.btl.pl.controller.MyRestWS&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>The application was successfully deployed on JBoss-wildfly 8 however when accessing the URL : <a href="http://localhost:8080/BTL_PL/btlservice/UserManagement/getUser" rel="nofollow noreferrer">http://localhost:8080/BTL_PL/btlservice/UserManagement/getUser</a>; i'm getting below errors on jboss console :</p>
  
  <pre><code>14:19:33,240 WARN  [org.jboss.resteasy.core.ExceptionHandler] (default task-10)
  failed to execute: javax.ws.rs.NotFoundException: Could not find resource for fu
  ll path: http://localhost:8080/BTL_PL/btlservice/UserManagement/getUser
          at org.jboss.resteasy.core.registry.ClassNode.match(ClassNode.java:73) [
  resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.core.registry.RootClassNode.match(RootClassNode.ja
  va:48) [resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(Res
  ourceMethodRegistry.java:444) [resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousD
  ispatcher.java:234) [resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
  tcher.java:171) [resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
  service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
  ce(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.6.Final.jar:]
          at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
  ce(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.6.Final.jar:]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-s
  ervlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHand
  ler.java:85) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.hand
  leRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.0.Final.jar:
  1.0.0.Final]
          at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(
  ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final
  ]
          at org.wildfly.extension.undertow.security.SecurityContextAssociationHan
  dler.handleRequest(SecurityContextAssociationHandler.java:78)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateH
  andler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.SSLInformationAssociationHandle
  r.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0
  .0.Final.jar:1.0.0.Final]
          at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest
  (AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRe
  quest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Final.jar:1.0
  .0.Final]
          at io.undertow.servlet.handlers.security.ServletConfidentialityConstrain
  tHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [underto
  w-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandl
  er.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.
  0.0.Final.jar:1.0.0.Final]
          at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(Se
  curityInitialHandler.java:76) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateH
  andler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.han
  dleRequest(JACCContextIdHandler.java:61)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateH
  andler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateH
  andler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest
  (ServletInitialHandler.java:240) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(Se
  rvletInitialHandler.java:227) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(Servlet
  InitialHandler.java:73) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(Se
  rvletInitialHandler.java:146) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
   [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:6
  87) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
  java:1145) [rt.jar:1.7.0_79]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
  .java:615) [rt.jar:1.7.0_79]
          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
  </code></pre>
  
  <p>Please let me know if there's something else that i need to add to the query for more information. Also, if i'm trying to access the wrong URL.</p>