title: A message body reader for Java class Foo, and Java type class Foo , and MIME media type text/html; charset=utf-8 was not found
body: <p>I am using Jersey service to call a service and i am getting this exception. Any help appreciated. And this problem is intermittent.</p>
  
  <pre><code>[|SEVERE|oracle-glassfish3.1.2|com.sun.jersey.api.client.ClientResponse|_ThreadID=99;_ThreadName=quartzScheduler_Worker-5;|A message body reader for Java class com.xxx.ResonseObjectView, and Java type class com.xxx.ResonseObjectView, and MIME media type text/html; charset=utf-8 was not found|#]
  
  [|SEVERE|oracle-glassfish3.1.2|com.sun.jersey.api.client.ClientResponse|_ThreadID=99;_ThreadName=quartzScheduler_Worker-5;|The registered message body readers compatible with the MIME media type are:
  */* -&gt;
    com.sun.jersey.core.impl.provider.entity.FormProvider
    com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider
    com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
    com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General
    com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General
    com.sun.jersey.core.impl.provider.entity.StringProvider
    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.XMLJAXBElementProvider$General
    com.sun.jersey.core.impl.provider.entity.ReaderProvider
    com.sun.jersey.core.impl.provider.entity.DocumentProvider
    com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceReader
    com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader
    com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader
    com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
    com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
    com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
    com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
    com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General
    com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General
    com.sun.jersey.core.impl.provider.entity.EntityHolderReader
    com.sun.jersey.moxy.MoxyMessageBodyWorker
    com.sun.jersey.moxy.MoxyListMessageBodyWorker
  |#]
  </code></pre>
  
  <blockquote>
    <p>Using @XmlRootElement for Response POJO</p>
  </blockquote>
  
  <pre><code>@XmlRootElement
  public class ResponseObjectView extends BaseRestObject
  
  @XmlRootElement
  public class BaseRestObject
  </code></pre>
  
  <blockquote>
    <p>This is how service is being called</p>
  </blockquote>
  
  <pre><code>  protected ClientResponse executeRequest( String resourceUrl, Object argument )
    {
      if( argument instanceof SecureToken )
      {
        SecureToken parameter = (SecureToken)  argument ;
        parameter.setSecurityToken( MD5Hash.hash( parameter.getHashableAttribute(), salt ) );
      }
      return this.buildWebResource( resourceUrl ).type( MediaType.APPLICATION_JSON_TYPE ).accept( MediaType.APPLICATION_JSON_TYPE ).post( ClientResponse.class, argument );
    }
  </code></pre>
  
  <blockquote>
    <p>This is service which consumes and produces MediaType JSON</p>
  </blockquote>
  
  <pre><code>  @POST
    @Path( "/test.biws" )
    @Consumes( MediaType.APPLICATION_JSON )
    @Produces( { MediaType.APPLICATION_JSON } )
    public ResponseObjectView request( RequestObjectView request, @Context UriInfo uriInfo )
    {
      ................
      return response;
    }
  </code></pre>