title: REST: GET returns UnsupportedMediaType
body: <p>I'm trying to <code>GET</code> data from Server via ReST. My server-side resource method looks like this:</p>
  
  <pre><code>@GET
  @Path("{id}")
  @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
  public PersonRepresentation getPerson(@PathParam("id") @Nonnull final Long id) {
  
      // collect data
      // and return representation
  
      return personRepresentation;
  }
  </code></pre>
  
  <p>The Class is defined like this:</p>
  
  <pre><code>@Path("person")
  @Component
  public class PersonResource {
  }
  </code></pre>
  
  <p>Now I'm trying to make a simple <code>GET</code> on that resource:</p>
  
  <pre><code>http://localhost:8080/rest/person/1234567890
  Accept: application/xml
  </code></pre>
  
  <p>And this is what my server responded:</p>
  
  <pre><code>HTTP Status 415 - Unsupported Media Type
  type: Status report
  message: Unsupported Media Type
  
  description: The server refused this request because the request entity is in a format     
  not supported by the requested resource for the requested method (Unsupported Media Type).
  </code></pre>
  
  <p>Why I'm getting this error when I'm using the <code>GET</code>-Method. I think I've set the <code>Accept-Header</code> correct and used the <code>@Produces</code> in a way that's recommended. After googling around, I've found some "solutions" that say: you have to set the content-type of your request. But isn't it only necessary if I have a request-body ? (<code>POST &amp; PUT</code>). Any ideas why I get the <code>Error-Code 415</code> ?</p>
  
  <p><strong>edited</strong>
  This is what my tomcat console says:</p>
  
  <pre><code>SEVERE: A message body reader for Java class java.lang.Long, and Java type class java.lang.Long, and MIME media type application/octet-stream was not found
  Feb 25, 2014 3:00:24 PM com.sun.jersey.spi.container.ContainerRequest getEntity
  SEVERE: The registered message body readers compatible with the MIME media type are:
  application/octet-stream -&gt;
    com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
    com.sun.jersey.core.impl.provider.entity.FileProvider
    com.sun.jersey.core.impl.provider.entity.InputStreamProvider
    com.sun.jersey.core.impl.provider.entity.DataSourceProvider
    com.sun.jersey.core.impl.provider.entity.RenderedImageProvider
  */* -&gt;
  </code></pre>