I'm currently working on an application that require me to deploy onto Google App Engine Server. My application runs perfectly fine locally on port 7777. However, when I deploy onto GAE, It starts to give me this error -
java.lang.IllegalStateException: Committed
and it just returns me a "null" in the GAE log.
There's no error. It only state a warning mess开发者_C百科age:
"
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 with this. Thanks in advance!
This java.lang.IllegalStateException: Committed
error often occurs when the HttpServletResponse
is commited twice. For example :
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
if (trueCondition)
resp.sendRedirect("/");
if (otherTrueCondition)
resp.sendRedirect("/other");
}
somehow having 2 sendRedirect() is causing the problem when the servlet is parsed. try to modify the logic to have only one sendRedirect() in your code. I had a similar situation with a local jetty server. GAE runs in jetty!
精彩评论