我目前正在开发一个需要我部署到Google App Engine服务器上的应用程序。我的应用程序在端口7777上本地运行完全正常。但是,当我部署到GAE时,它开始给我这个错误 -
java.lang.IllegalStateException: Committed
它只会在GAE日志中返回“null”。
没有错误。它只发出警告信息:
“
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)
”
希望有人可以帮助我。提前谢谢!
答案 0 :(得分:5)
当java.lang.IllegalStateException: Committed
提交两次时,通常会发生此HttpServletResponse
错误。例如:
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
if (trueCondition)
resp.sendRedirect("/");
if (otherTrueCondition)
resp.sendRedirect("/other");
}
答案 1 :(得分:1)
以某种方式有2个sendRedirect()导致解析servlet时出现问题。 尝试修改逻辑,使代码中只有一个sendRedirect()。我和当地的码头服务器有类似的情况。 GAE在码头上运行!