users@jersey.java.net

[Jersey] Re: jersey with jetty - runnable jar

From: avner.eizner <avner.eizner_at_gmail.com>
Date: Sat, 3 Sep 2011 11:15:57 -0700 (PDT)

Thanks for the answer,
but even when I do Extract it does not work for me.
I get the following output:



C:\test\server>java -jar server.jar
2011-09-03 21:06:41.775:INFO::Logging to STDERR via
org.mortbay.log.StdErrLog
2011-09-03 21:06:41.818:INFO::jetty-6.1.x
2011-09-03 21:06:41.876:INFO::Started SocketConnector_at_0.0.0.0:8080
±⌠Φ 03, 2011 9:06:44 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
  restServlets
±⌠Φ 03, 2011 9:06:45 PM com.sun.jersey.api.core.ScanningResourceConfig
logClasse
s
INFO: Root resource classes found:
  class restServlets.Test
±⌠Φ 03, 2011 9:06:45 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
±⌠Φ 03, 2011 9:06:45 PM
com.sun.jersey.server.impl.application.WebApplicationImp
l _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.8 06/24/2011 12:17
PM'
±⌠Φ 03, 2011 9:06:45 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class java.lang.String, and Java type
class java.lang.String, and MIME media type text/plain was not found
±⌠Φ 03, 2011 9:06:45 PM 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

±⌠Φ 03, 2011 9:06:45 PM 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 java.lang.String, and Java type class
java.lang.String, and MIME media type text/plain was not found
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerRespons
e.java:285)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
        at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        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)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: com.sun.jersey.api.MessageException: A message body writer for
Java class java.lang.String, and Java type class java.lang.String, and MIME
media type text/plain was not found
        ... 21 more


--
View this message in context: http://jersey.576304.n2.nabble.com/jersey-with-jetty-runnable-jar-tp6753636p6757080.html
Sent from the Jersey mailing list archive at Nabble.com.