title: Java REST ful client code is problem
body: <p>I am trying to create the REST-ful web service in java.
  This REST-ful web service contains both Hibernate configuration and Rest-ful configuration.
  Actually the java web service is working perfect. but when i am try to execute the client code for that web service.</p>
  
  <p>The jar files that am using is</p>
  
  <pre><code>activation
  antlr-2.7.6
  asm-3.1
  asm-attrs
  cglib-nodep
  commons-collections-2.1.1
  commons-fileupload-1.2.1
  commons-io-1.3.2
  commons-logging-1.1
  dom4j-1.6.1
  ehcache-1.2.3
  ejb3-persistence
  grizzly-servlet-webserver-1.7.3.2
  hibernate-annotations
  hibernate-commons-annotations
  hibernate-entitymanager
  hibernate-tools
  hibernate3
  http
  javassist
  jaxb-api
  jaxb-impl
  jaxb-xjc
  jdbc2_0-stdext
  jdom-1.0
  jersey-core-1.7
  jersey-server-1.7
  jersey-spring
  jersey
  jettison-1.0-RC1
  jsr173_api
  jsr311-api
  jta
  mysql-connector-java-5.1.12-bin
  osgi
  rome-0.9
  wadl2java
  </code></pre>
  
  <p>My problem is </p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: com.sun.jersey.spi.inject.InjectableProviderContext.getInjectable(Ljava/lang/Class;Lcom/sun/jersey/spi/service/ComponentContext;Ljava/lang/annotation/Annotation;Ljava/lang/Object;Ljava/util/List;)Lcom/sun/jersey/spi/inject/Injectable;
          at com.sun.jersey.spi.service.ComponentConstructor.getConstructor(ComponentConstructor.java:139)
          at com.sun.jersey.impl.application.ComponentProviderCache.getComponent(ComponentProviderCache.java:177)
          at com.sun.jersey.impl.application.ComponentProviderCache.getProvidersAndServices(ComponentProviderCache.java:122)
          at com.sun.jersey.impl.application.MessageBodyFactory.getProviderMap(MessageBodyFactory.java:133)
          at com.sun.jersey.impl.application.MessageBodyFactory.initReaders(MessageBodyFactory.java:107)
          at com.sun.jersey.impl.application.MessageBodyFactory.init(MessageBodyFactory.java:102)
          at com.sun.jersey.api.client.Client.&lt;init&gt;(Client.java:284)
          at com.sun.jersey.api.client.Client.&lt;init&gt;(Client.java:209)
          at com.sun.jersey.api.client.Client.create(Client.java:429)
          at pack1.client.Test.main(Test.java:20)
  </code></pre>
  
  <p>Client Java code is </p>
  
  <pre><code>package pack1.client;
  
  import java.net.URI;
  import javax.ws.rs.core.MediaType;
  import javax.ws.rs.core.UriBuilder;
  import com.sun.jersey.api.client.Client;
  import com.sun.jersey.api.client.ClientResponse;
  import com.sun.jersey.api.client.WebResource;
  import com.sun.jersey.api.client.config.ClientConfig;
  import com.sun.jersey.api.client.config.DefaultClientConfig;
  
  public class Test {
      public static void main(String[] args) {
          ClientConfig config = new DefaultClientConfig();
          Client client = Client.create(config);
          WebResource service = client.resource(getBaseURI());
          System.out.println(service.path("resources").path("hello").path("xml").accept(
                          MediaType.TEXT_PLAIN).get(ClientResponse.class));
      }
      private static URI getBaseURI() {
              return UriBuilder.fromUri("http://localhost/WebServicePgm1").build();
      }
  }
  </code></pre>
  
  <p>The method that am trying to test in client code which is </p>
  
  <pre><code>    @GET
      @Path("xml")
      @Produces(MediaType.TEXT_XML)
      public String sayXMLHello() {
          return "&lt;?xml version=\"1.0\"?&gt;" + "&lt;hello&gt; Hello Jersey &lt;/hello&gt;";
      }
  </code></pre>
  
  <p><strong>After Changing the jar file</strong> </p>
  
  <p>the above problem is solved and new problem gets occured.</p>
  
  <p>@ gkatkov am using Apache Tomcat 6.0.20 and now.
  i have updated the jersey jar to jersey 1.8. after updating the jar file am getting another error that is </p>
  
  <p>Jar file that i put now is </p>
  
  <pre><code>jersey-server-1.8.jar
  jersey-json-1.8.jar
  jersey-core-1.8.jar
  jersey-client-1.8.jar
  </code></pre>
  
  <p>Now the problem is</p>
  
  <pre><code>com.sun.jersey.spi.inject.Errors processErrorMessages
  SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
    SEVERE: Missing dependency for field: javax.ws.rs.core.UriInfo com.sun.jersey.impl.template.ViewableMessageBodyWriter.ui
    SEVERE: Missing dependency for field: com.sun.jersey.spi.template.TemplateContext com.sun.jersey.impl.template.ViewableMessageBodyWriter.tc
  Exception in thread "main" com.sun.jersey.spi.inject.Errors$ErrorMessagesException
          at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)
          at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136)
          at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199)
          at com.sun.jersey.api.client.Client.&lt;init&gt;(Client.java:187)
          at com.sun.jersey.api.client.Client.&lt;init&gt;(Client.java:170)
          at com.sun.jersey.api.client.Client.create(Client.java:679)
          at pack1.client.Test.main(Test.java:20)
  </code></pre>
  
  <p>do i need to put any other jar files?</p>