2 Replies Latest reply on Aug 10, 2002 8:29 AM by Greg Wilkins

    IllegalStateException when posting data to Jetty

    Panagiotis Korros Newbie

      I get the following error when i am posting data to jetty:

      12:15:46,641 WARN [jbossweb] WARNING: Exception for /web-services/Tree?cmd
      =POSTNODE
      java.lang.IllegalStateException
      at org.mortbay.jetty.servlet.ServletHttpRequest.getReader(ServletHttpRequest.java:693)
      at ecentric.ws.TreeWebService.doPost(TreeWebService.java:218)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:361)
      at ecentric.filters.NoCacheFilter.doFilter(NoCacheFilter.java:34)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:353)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:305)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554)
      at org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler.java:199)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1572)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1522)
      at org.mortbay.http.HttpServer.service(HttpServer.java:795)
      at org.jboss.jetty.Jetty.service(Jetty.java:531)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:784)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:799)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:713)
      at java.lang.Thread.run(Thread.java:536)

      12:15:52,229 WARN [jbossweb] WARNING: Reserve: 586>512
      12:15:52,239 WARN [jbossweb] WARNING: Shift reserve: 2460+586<4096

      the code is (doPost):

      request.setCharacterEncoding("UTF-8");
      response.setContentType("text/xml");
      Reader r = request.getReader();
      ...


      Does anyone knows what is wrong with my code?
      Is it a jetty problem?
      any workarounds?