簡體   English   中英

Google App Engine- java.lang.IllegalStateException:提交的錯誤

[英]Google App Engine- java.lang.IllegalStateException: Committed Error

我目前正在開發一個需要我部署到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 java.lang.IllegalStateException: Committed兩次時發生。 例如 :

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

不知何故有2個sendRedirect()導致解析servlet時出現問題。 嘗試修改邏輯,使代碼中只有一個sendRedirect()。 我和當地的碼頭服務器有類似的情況。 GAE在碼頭上運行!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM