title: Jersey application not working on WebLogic
body: <p>I've a application that is working fine when I deploy it on a tomcat server but got not working if deployed on weblogic.<br>
  Tomcat verison is: 7.0.47<br>
  Weblogic version is: 12.2.1.2.0 </p>
  
  <p>There is a simple rest endpoint that returns a JSON:<br>
  <a href="http://localhost:8080/MyApplication/rest/configuration/test" rel="nofollow noreferrer">http://localhost:8080/MyApplication/rest/configuration/test</a><br>
  Works fine on tomcat, on weblogic I get only the string "Not Found".</p>
  
  <p>In the log files the only warings I found are the following:</p>
  
  <pre><code>&lt;Warning&gt; &lt;JAXRSIntegration&gt; &lt;MyApplication&gt; &lt;[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;&gt; &lt;24ad6e0e-7bbc-4781-b294-f546069677ec-00000007&gt; &lt;1511013418859&gt; &lt;[severity-value: 16] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] &gt; &lt;BEA-2192510&gt; &lt;Cannot add Jersey servlet for application class org.glassfish.jersey.server.ResourceConfig because ApplicationPath annotation is not set on it.&gt;
  &lt;Warning&gt; &lt;JAXRSIntegration&gt; &lt;MyApplication&gt; &lt;[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;&gt; &lt;24ad6e0e-7bbc-4781-b294-f546069677ec-00000007&gt; &lt;1511013418860&gt; &lt;[severity-value: 16] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] &gt; &lt;BEA-2192510&gt; &lt;Cannot add Jersey servlet for application class org.glassfish.jersey.server.ResourceConfig$WrappingResourceConfig because ApplicationPath annotation is not set on it.&gt;
  &lt;Warning&gt; &lt;JAXRSIntegration&gt; &lt;MyApplication&gt; &lt;[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;&gt; &lt;24ad6e0e-7bbc-4781-b294-f546069677ec-00000007&gt; &lt;1511013418861&gt; &lt;[severity-value: 16] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] &gt; &lt;BEA-2192510&gt; &lt;Cannot add Jersey servlet for application class org.glassfish.jersey.server.ResourceConfig$RuntimeConfig because ApplicationPath annotation is not set on it.&gt;
  </code></pre>
  
  <p>The EndPoint:</p>
  
  <pre><code>@Path("/configuration")
  @NoCache
  public class ConfigurationResource {
      @GET
      @Path("/test")
      @Produces(MediaType.APPLICATION_JSON)
      public Response getClientConfig() {
          Map&lt;String, Object&gt; map = new HashMap&lt;&gt;();
          map.put("test", "Test is running.");
          return Response.ok(map).build();
      }
  
      ...
  }
  public class MyApplication extends ResourceConfig {
      public MyApplication() {
          register(ConfigurationResource.class);
      }
  }
  </code></pre>
  
  <p>from the web.xml</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&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.sample.rest.MyApplication&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
          &lt;param-value&gt;true&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-servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>weblogic.xml:</p>
  
  <pre><code>&lt;weblogic-web-app&gt;
      &lt;container-descriptor&gt;
          &lt;prefer-application-packages&gt;
            &lt;package-name&gt;javax.ws.rs&lt;/package-name&gt;
            &lt;package-name&gt;javax.persistence&lt;/package-name&gt;
            &lt;package-name&gt;org.apache.commons&lt;/package-name&gt;
            &lt;package-name&gt;org.slf4j&lt;/package-name&gt;
            &lt;package-name&gt;org.apache.commons.logging&lt;/package-name&gt;
            &lt;/prefer-application-packages&gt;
      &lt;/container-descriptor&gt;
  &lt;/weblogic-web-app&gt;
  </code></pre>
  
  <p>I already tried adding the annotation but without an effect.<br>
  Does have anybody any idea what I can do to get it working?</p>