title: REST JAX-RS javax.ws.rs.ProcessingException:
body: <p>I am getting below exception whenever my REST client code makes a call to the REST service using below code:
  <strong>Code:</strong></p>
  
  <pre><code>public void putWatcher(Watcher watcher)
      {
          System.out.println("In REST Client putWatcher.***********");
  
          target = target.path(RESOURCE_WATCHERS).path(watcher.getWatcheruri());
          System.out.println(target.getUri());
          Invocation.Builder builder = target.request();
          builder.put(Entity.json(watcher));
  //      Response response = target.request().put(Entity.json(watcher));
          System.out.println("Returned from REST Call");
      }
  </code></pre>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>: javax.ws.rs.ProcessingException: javax.ws.rs.core.Response$Status$Family.familyOf(I)Ljavax/ws/rs/core/Response$Status$Family;
      at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
      at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
      at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
      at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
      at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
      at org.glassfish.jersey.client.JerseyInvocation$Builder.put(JerseyInvocation.java:318)
  
  Caused by: java.lang.NoSuchMethodError: javax.ws.rs.core.Response$Status$Family.familyOf(I)Ljavax/ws/rs/core/Response$Status$Family;
      at org.glassfish.jersey.message.internal.Statuses$StatusImpl.&lt;init&gt;(Statuses.java:63)
      at org.glassfish.jersey.message.internal.Statuses$StatusImpl.&lt;init&gt;(Statuses.java:54)
      at org.glassfish.jersey.message.internal.Statuses.from(Statuses.java:93)
      at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:323)
      at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227)
      at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
      ... 29 more
  </code></pre>
  
  <p>My <strong>REST service is deployed on Tomcat 8</strong> server and the <strong>client code is deployed on JBoss 7.2.</strong>
  The client application is SIP-Servlets application which also bundles REST client.</p>
  
  <p>When I test the client as a standalone Java Application it works but when deployed on JBoss it gives the error.
  <strong>My POM file is:</strong></p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;!-- logging dependency --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
      &lt;version&gt;1.2.14&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;commons-logging&lt;/groupId&gt;
      &lt;artifactId&gt;commons-logging-api&lt;/artifactId&gt;
      &lt;version&gt;1.0.4&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;!-- web j2ee dependencies --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;version&gt;2.5&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;!-- sip dependencies --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.mobicents.servlet.sip&lt;/groupId&gt;
      &lt;artifactId&gt;sip-servlets-spec&lt;/artifactId&gt;
      &lt;version&gt;1.7.0.FINAL&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
      &lt;version&gt;2.13&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-common&lt;/artifactId&gt;
      &lt;version&gt;2.13&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
      &lt;version&gt;1.9.13&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
      &lt;version&gt;2.13&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I also try to do as suggested on this link <a href="https://github.com/gondor/openstack4j/issues/30" rel="noreferrer">https://github.com/gondor/openstack4j/issues/30</a>
  It says to disable JAX-RS from JBOSS config standalone.xml. I am using standalone-sip.xml while starting the server so I modified that only. Removed these two lines:</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/&gt;
  &lt;extension module="org.jboss.as.jaxrs"/&gt;
  </code></pre>
  
  <p>This also is not working. I don't know how to disable, just searched for JAX-RS and deleted those lines where I found those.</p>
  
  <p>In one SO post there was a suggestion to use <code>javax.ws.rs.core.Response respone</code> instead of <code>Response response</code> tried that also but no luck.</p>
  
  <p>One more info: the REST call itself is successful, that I can see on tomcat server.</p>
  
  <p>Please suggest what else can be done.</p>
  
  <p>Thanks</p>