Google App Engine - java.lang.IllegalStateException: Bug fixed

I am currently working on an application that requires me to deploy to Google App Engine Server. My application works fine locally on port 7777. However, when I deploy to GAE, it starts giving me this error -

java.lang.IllegalStateException: Committed 

and it just returns me β€œzero” in the GAE log.

There is no mistake. It contains only a warning message:

" A serious problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. If you see this message frequently, you may be throwing exceptions during the initialization of your application. (Error code 104) "

Hope someone can help me. Thanks in advance!

+3
source share
2 answers

This java.lang.IllegalStateException: Committed error often occurs when the HttpServletResponse committed twice. For instance:

 protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (trueCondition) resp.sendRedirect("/"); if (otherTrueCondition) resp.sendRedirect("/other"); } 
+5
source

somehow with 2 sendRedirect () causes a problem while parsing the servlet. try changing the logic to have only one sendRedirect () in your code. I had a similar situation with the local pier server. GAE works at the pier!

+1
source

All Articles