title: Unable to invoke REST resource deployed on Weblogic 12c (12.1.3) remote server. When it work on localhost without any issue
body: <p>I have written a dynamic web application using following tools:</p>
  
  <ul>
  <li>AngularJS - REST call</li>
  <li>JQuery - REST call to update pie chart </li>
  <li>JAX-RS</li>
  <li>Jersey</li>
  <li>Weblogic 12c (12.1.3)</li>
  </ul>
  
  <p>These are jars in lib folder shown in this image:</p>
  
  <p><img src="https://i.stack.imgur.com/Jdouz.jpg" alt="Jars in lib folder"></p>
  
  <p>REST Resource</p>
  
  <pre><code>@Path("/audit")
  public class AuditResource {
  
      private AuditLogService auditLogService = new AuditLogServiceImpl();
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      @Path("/all")
      public List&lt;AuditLog&gt; getAllLog() {
          List&lt;AuditLog&gt; allLog = null;
          try {
  
              allLog = auditLogService.getAllLog();
  
          } catch(final ApplicationException ex) {
              throw ex;
          }
  
          if(allLog != null &amp;&amp; allLog.isEmpty()) {
              throw new ApplicationException("Data not found", Status.NOT_FOUND);
          }
          return allLog;
      }
  }
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;pages/index.html&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  
    &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;my.resources&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 REST Service&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>AngularJS controller</p>
  
  <pre><code>app.controller('main', ['$scope', '$http', function($scope, $http) {
  
      $scope.allLog = function() {
  
  
          $http.get("services/audit/all")
          .then(function successCallback(response) {
  
              $scope.logs = response.data;
  
          },  function errorCallback(response) {
  
              console.log(response);
          });
  
      };
  
      $scope.allLog();
  }]);
  </code></pre>
  
  <p>Executing this AngularJS controller and jQuery AJAX call definitely works on localhost without any problem, however it does not work when deployed on already running remote Weblogic server. Does anyone faced the same issue? And able to solve the riddle?</p>
  
  <p>When I run the application on remote weblogic server following message prints on console</p>
  
  <pre><code>http://hostIP:7011/AuditLogView/services/audit/all
  
   Object {data: "Not Found", status: 404, config: Object, statusText: "Not Found"}
  </code></pre>
  
  <p>Another issue is the log4j is unable to write logs on remote server.</p>
  
  <p>log4j configurations and lib shown in this image:</p>
  
  <p><img src="https://i.stack.imgur.com/KJJeD.jpg" alt="log4j configuration"></p>
  
  <p>When the application deploys on localhost in logs it shows a warning in eclipse console, although in lib directory <strong>jersey-bundle-1.19.1.jar</strong> already exists. If it does not create issue on localhost then, I am less worried about it.</p>
  
  <pre><code>WARNING: 
  **********
  The application is using ServletContainerInitializer class com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer that is loaded from:file:/C:/Oracle/Middleware/Oracle_Home/oracle_common/modules/jersey-servlet-1.18.jar. This initializer overrides the one available in the system.
  **********
  </code></pre>