title: Spring error - springframework.web.client.HttpClientErrorException: 404 Not Found
body: <p>I'm trying to pass an object to another class using <em>Spring</em> (I'm not sure I'm using the right terms, I'm very new to <em>Spring</em>) this way:</p>
  
  <pre class="lang-java prettyprint-override"><code>TestServicesUtils.getTemplate().postForLocation(
       "http://"
       + serverConfig
       + ":"
       + port
       + "/test/rest/TestResultService/insertTestResult/",
      results); 
  </code></pre>
  
  <p>When I ran the program it gets to that line and it trows an <code>Exception</code>:</p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  org.springframework.web.client.HttpClientErrorException: 404 Not Found
          at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:76)
  </code></pre>
  
  <p>The class that's trying to connect to:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Service("TestRestImpl")
  @Path("TestResultService")
  @Produces("application/json")
  public class TesttRestImpl implements TestResultRest 
  { 
      ...
      @POST
      @Override
      @Path("/insertTestResult")
      @Consumes("application/xml")
      public void insertTestResult(TestRestCollection list) {
          testresultservicedao.insertTestResult(list.getListOfResults());
      }
  }
  </code></pre>
  
  <p>The path seems to be fine, I don't know why it can't find the method.  Do I need to register the path? </p>