Hi,
I am trying to use BaseX JAX-RX embedded, e.g. start it from my desktop application when the user clicks "Open App" in the system tray menu. The server starts up fine, but when I try to send it a query the Jersey server generates an error, see the log below after the user clicks "Open App".
================================================================================================
7-jul-2011 16:25:01 com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
org.jaxrx.resource
7-jul-2011 16:25:02 com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class org.jaxrx.resource.XMLResource
class org.jaxrx.resource.JaxRxResource
7-jul-2011 16:25:02 com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
7-jul-2011 16:25:02 com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.6 03/25/2011 01:14 PM'
7-jul-2011 16:25:03 com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class org.basex.api.jaxrx.BXJaxRx$2, and Java type class org.basex.api.jaxrx.BXJaxRx$2, and MIME media type text/xml; omit-xml-declaration=no was not found
7-jul-2011 16:25:03 com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type are:
*/* ->
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
7-jul-2011 16:25:03 com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class org.basex.api.jaxrx.BXJaxRx$2, and Java type class org.basex.api.jaxrx.BXJaxRx$2, and MIME media type text/xml; omit-xml-declaration=no was not found
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1310)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1223)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1213)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
================================================================================================
I already tried removing the "; omit-xml-declaration=no" but that didn't help.
Any ideas on why this does not work?
Hartelijke groet,
Huib Verweij.
--
Drs. Huib Verweij
Senior software developer - The Language Archive
Max Planck Institute for Psycholinguistics
P.O. Box 310
6500 AH Nijmegen
The Netherlands