title: Exception with MediaType.APPLICATION_JSON and MediaType.APPLICATION_XML but MediaType.TEXT_XML running fine
body: <p>Getting exception as <code>Exception in thread "main" javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error</code>.   </p>
  
  <p>For  @Produces({MediaType.APPLICATION_JSON }) or @Produces({MediaType.APPLICATION_XML }) in my Rest Based webservice
  when I run Rest Based client as "Run as Java Application"
  webservice using Jersey + JaxB BUT same web service giving expected output when I am using  @Produces({ MediaType.TEXT_XML }).</p>
  
  <p>Note: I am using Rest Based + Jersy +JaxB, I have done annotation at POJO side too as "@XmlRootElement".</p>
  
  <p>Below is console logs::::</p>
  
  <p>// Below output is for MediaType.TEXT_XML 
  This is my first todoThis is my first todo</p>
  
  <p>// Below output is for MediaType.APPLICATION_JSON</p>
  
  <pre><code>Exception in thread "main" javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
  at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:968)
  at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:795)
  at org.glassfish.jersey.client.JerseyInvocation.access$500(JerseyInvocation.java:91)
  at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
  at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
  at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
  at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:408)
  at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:308)
  at com.restfull.demo2.Test.main(Test.java:32)
  </code></pre>