title: Jersey, The ResourceConfig instance does not contain any root resource classes
body: <p>All, I am trying to write a project using the java restful service by jersey. I get problems "The ResourceConfig instance does not contain any root resource classes". I've tried all solutions from here and it didn't work.</p>
  
  <ol>
  <li><p>I create a new project named "test"</p></li>
  <li><p>The web.xml is :</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
          &lt;param-value&gt;test&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/api/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre></li>
  <li><p>A simple service:</p>
  
  <pre><code>@Path("/message")
  public class MessageRestService {
  
  }
  </code></pre></li>
  <li><p>Also I change the classes built path into /WEB-INF/classes</p></li>
  </ol>
  
  <p>And I start the project in tomcat 7 also tried 8, the problem is still there </p>