Our application built using Seam and Rest Easy was running without any issues until we upgraded or Jboss from Jboss 4 to JbossAs-7. As soon as we upgraded to JbossAs-7 our REST API stopped working, with the error message on browser as HTTP Status 404 - Could not find resource without giving any exception. With initial investigation we went clue-less because Seam resource servlet configures the rest easy internally.

Investigation

More investigation and debugging the seam ResourceServlet uncovered why is this happening. Later, I found that ResourceServlet tries to find the resource provider for the rest url and throws HTTP-404 because there is no resource provider configured for the rest.
New modular approach
This issue appeared in JbossAs-7 because of new modular approach instead of regular application deployment. We need to register every library and the application as modules in JbossAs-7. Also JbossAs-7 comes with some pre-loaded modules like JPA, CDI, Rest easy etc. I went through the Rest easy documents and some of the forum-threads and came across a solution for this problem of not finding resource. I am hoping this may help others, hence writing this blog.
Why ResourceServlet is not able to configure Rest easy
Its because JbossAs-7 is already having rest easy module registered. Hence, ResourceServlet is not able to register the module again, as a result it throws HTTP-404.

Solution

There are a couple of solutions available for this problem, I will be listing them here.
Web.xml approach of registering the providers along with the HttpServletDispatcher
HttpServletDispatcher Configuration
HttpServletDispatcher Mapping
Configuring providers using annotation
Context and Listener Configuration
Servlet Configuration and Mapping
Along with this configuration, we need to place the @provider annotation on the top of the provider resource class, so that it can be registered as a resource provider in the ResteasyBootstrap.