users@jersey.java.net

Re: [Jersey] error: A message body writer for Java type [] and MIME media type, application/xml, was not found

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 17 Feb 2009 16:15:58 +0100

Hi Mukesh,

I replied to you previous email, see here:

http://markmail.org/search/?q=list
%3Anet.java.dev.jersey.users#query:list%3Anet.java.dev.jersey.users
+page:2+mid:nivqstz6h7hus654+state:results

I need more information about your application to determine why this
is not working. Ideally a zip file of the source to generate the war
would be most helpful.

Paul.

On Feb 17, 2009, at 3:35 PM, Singhania, Mukesh wrote:

> I am trying to deploy and test the jaxb
> (com.sun.jersey.samples.jaxb.JAXBResource) service which comes with
> the Jersey samples on Tomcat.
>
> when i try to access resource : /jaxb/XmlRootElement
>
> I get this error:
>
>
> Feb 16, 2009 5:44:37 PM
> com.sun.jersey.spi.container.ContainerResponse write
> SEVERE: A message body writer for Java type, class
> com.sun.jersey.samples.jaxb.JAXBXmlRootElement, and MIME media type,
> application/xml, was not found
> Feb 16, 2009 5:44:37 PM
> com.sun.jersey.server.impl.application.WebApplicationImpl onException
> SEVERE: Internal server error
> javax.ws.rs.WebApplicationException
> at
> com
> .sun
> .jersey.spi.container.ContainerResponse.write(ContainerResponse.java:
> 240)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl._handleRequest(WebApplicationImpl.java:593)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
> at
> com
> .sun
> .jersey
> .spi
> .container.servlet.ServletContainer.service(ServletContainer.java:359)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:
> 803)
> at
> org
> .apache
> .catalina
> .core
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 269)
> at
> org
> .apache
> .catalina
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 213)
> at
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 174)
> at
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org
> .apache
> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 108)
> at
> org
> .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 174)
> at
> org
> .apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 874)
> at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
> :665)
> at
> org
> .apache
> .tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
> 528)
> at
> org
> .apache
> .tomcat
> .util
> .net
> .LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> at org.apache.tomcat.util.threads.ThreadPool
> $ControlRunnable.run(ThreadPool.java:689)
> at java.lang.Thread.run(Thread.java:595)
>
> Not sure if i am missing anything... i have all Jersey and JAXB jars
> in WEB-INF/lib
>
> PLEASE HELP!!
>
> Thanks
> Mukesh