Google App Engine- java.lang.IllegalStateException:提交的错误 [英] Google App Engine- java.lang.IllegalStateException: Committed Error
问题描述
我当前正在开发一个需要我部署到Google App Engine服务器上的应用程序.我的应用程序在端口7777上本地运行良好.但是,当我部署到GAE时,它开始给我这个错误-
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
它只是在GAE日志中给我返回了空".
and it just returns me a "null" in the GAE log.
没有错误.它仅显示警告消息:
There's no error. It only state a warning message:
"
处理此请求的进程遇到严重问题,导致其退出.这很可能导致将新进程用于对您的应用程序的下一个请求.如果经常看到此消息,则可能会在应用程序初始化期间引发异常.(错误代码104)
"
希望有人可以帮助我.预先感谢!
Hope someone can help me with this. Thanks in advance!
推荐答案
当两次提交 HttpServletResponse
时,通常会发生此 java.lang.IllegalStateException:Committed
错误.例如:
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");
}
这篇关于Google App Engine- java.lang.IllegalStateException:提交的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!