title: rest template returns 500 internal server error exception
body: <p>I'm making an app and trying to get json written on the web page. So, I can see this page in browser: it contains only json.</p>
  
  <p>But when I start a request with the <code>RestTemplate</code> it returns ma only 500 internal server error.</p>
  
  <p>My caode is very simple:</p>
  
  <pre><code>    RestTemplate restTemplate = new RestTemplate();
      HttpHeaders requestHeaders = new HttpHeaders();    
      requestHeaders.setContentType(MediaType.APPLICATION_JSON);
      HttpEntity&lt;?&gt; requestEntity = new HttpEntity&lt;&gt;(requestHeaders);
      ResponseEntity&lt;MyClass[]&gt; responseEntity =     restTemplate.exchange(url, HttpMethod.GET, requestEntity, MyClass[].class);
  </code></pre>
  
  <p>I cannot understand what is wrong: I have an access, it is simple, I'm not authentificated and I don't need id. Why an error?</p>