gpt4 book ai didi

java - Google App Engine- java.lang.IllegalStateException : Committed Error

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:56:39 24 4
gpt4 key购买 nike

我目前正在开发一个需要我部署到 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)"

希望有人能帮我解决这个问题。提前致谢!

最佳答案

java.lang.IllegalStateException: Committed 错误通常发生在 HttpServletResponse 被提交两次时。例如:

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

关于java - Google App Engine- java.lang.IllegalStateException : Committed Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4162977/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com