2015-04-01 25 views
1

我有幾個地方設置,他們工作正常,除了由此問題引起的延遲。他們使用嵌套的演示者。 對於一個地方,似乎任何重複嘗試加載它會導致無限循環顯示錯誤/未經授權的地方(不知道爲什麼,沒有網守設置),但然後正確加載頁面。我遇到的問題是它引起的延遲和不必要的日誌垃圾郵件 - 它正確地加載頁面,爲什麼不能在沒有首先通過循環的情況下進行呢?有人有主意嗎?GWTP無效的嘗試顯示錯誤的地方,但然後正常工作

- 更新 -

我使用GWTP 1.4 GWT 2.7.0,但該項目首次採用GWTP 0.6或更早可能產生。我們已經升級了更新版本,但我知道還有一些遺憾。
我嘗試用默認方式切換出我們的ClientPlaceManager,將ErrorPlace和UnauthorizedPlace綁定到我們的主頁,並刪除了它的看門人,但它仍然試圖去錯誤的地方(overrode revealErrorPlace方法,並注意到它拋出了錯誤一個頁面,特別是一個頁面,主持人生命週期階段沒有任何一個正在觸發,雖然主持人是可見的(只有在我認爲的Firefox中打破),但我真的不明白這一點

- UPDATE 2 -

我已經去除了守門(甚至指定@NoGatekeeper),確保了錯誤/未經授權的地方有@NoGatekeeper和存在,並凌駕於revealPlace (request,updateUrl)輸出結果,並添加一個try/catch - 並且它完成同樣的事情。無限循環,但一切都可以訪問。我的調試輸出甚至顯示它試圖揭示錯誤的地方,但它永遠不會,只是出錯。 這令人沮喪不已。

堆棧跟蹤:

SEVERE: Exception caught: Encountered repeated errors resulting in an infinite 
loop. Make sure all users have access to the pages revealed by revealErrorPlace 
and revealUnauthorizedPlace. (Note that the default implementations call 
revealDefaultPlace) 
com.google.gwt.event.shared.UmbrellaException: Exception caught: 
Encountered repeated errors resulting in an infinite loop. Make sure all users 
have access to the pages revealed by revealErrorPlace and 
revealUnauthorizedPlace. (Note that the default implementations call 
revealDefaultPlace) 
    at Unknown.fillInStackTrace_0_g$([email protected]:10580) 
    at Unknown.Throwable_3_g$([email protected]:10535) 
    at Unknown.Exception_3_g$([email protected]:10678) 
    at Unknown.RuntimeException_3_g$([email protected]:61481) 
    at Unknown.UmbrellaException_3_g$([email protected]:133542) 
    at Unknown.UmbrellaException_5_g$([email protected]:133603) 
    at Unknown.fireEvent_7_g$([email protected]:133134) 
    at Unknown.fireEvent_12_g$([email protected]:154354) 
    at Unknown.fire_8_g$([email protected]:132936) 
    at Unknown.fireValueChangedEvent_0_g$([email protected]:154358) 
    at Unknown.onHashChanged_0_g$([email protected]:154297) 
    at Unknown.apply_0_g$([email protected]:109006) 
    at Unknown.entry0_0_g$([email protected]:109062) 
    at Unknown.anonymous([email protected]:109042) 
Caused by: java.lang.RuntimeException: Encountered repeated errors resulting in 
an infinite loop. Make sure all users have access to the pages revealed by 
revealErrorPlace and revealUnauthorizedPlace. (Note that the default 
implementations call revealDefaultPlace) 
    at Unknown.fillInStackTrace_0_g$([email protected]:10580) 
    at Unknown.Throwable_2_g$([email protected]:10526) 
    at Unknown.Exception_2_g$([email protected]:10672) 
    at Unknown.RuntimeException_2_g$([email protected]:61475) 
    at Unknown.startError_0_g$([email protected]:92009) 
    at Unknown.error_2_g$([email protected]:91772) 
    at Unknown.doRevealPlace_0_g$([email protected]:91762) 
    at Unknown.revealPlace_1_g$([email protected]:91921) 
    at Unknown.revealPlace_0_g$([email protected]:91908) 
    at Unknown.revealErrorPlace_1_g$([email protected]:92109) 
    at Unknown.error_2_g$([email protected]:91773) 
    at Unknown.doRevealPlace_0_g$([email protected]:91762) 
    at Unknown.handleTokenChange_0_g$([email protected]:91848) 
    at Unknown.onValueChange_4_g$([email protected]:91888) 
    at Unknown.dispatch_87_g$([email protected]:132968) 
    at Unknown.dispatch_88_g$([email protected]:132972) 
    at Unknown.dispatch_0_g$([email protected]:49973) 
    at Unknown.dispatchEvent_2_g$([email protected]:133006) 
    at Unknown.doFire_0_g$([email protected]:133250) 
    at Unknown.fireEvent_8_g$([email protected]:133323) 
    at Unknown.fireEvent_7_g$([email protected]:133128) 
    at Unknown.fireEvent_12_g$([email protected]:154354) 
    at Unknown.fire_8_g$([email protected]:132936) 
    at Unknown.fireValueChangedEvent_0_g$([email protected]:154358) 
    at Unknown.onHashChanged_0_g$([email protected]:154297) 
    at Unknown.apply_0_g$([email protected]:109006) 
    at Unknown.entry0_0_g$([email protected]:109062) 
    at Unknown.anonymous([email protected]:109042) 
+0

您正在使用哪個版本的GWTP? 您是否設置了DefaultGateKeeper? 你是否改變了prepareFromRequest方法的地方? – meriouma 2015-04-16 03:31:34

+0

我更新了版本和更詳細的問題,但我使用GWT 1.4和GWT 2.7.0。我第一次看到問題的頁面/主持人沒有設置關守,儘管我發現了另一個頁面,它在使用原始錯誤頁面中的瀏覽器返回按鈕時拋出錯誤,並且它有一個關守。我刪除它,仍然沒有運氣。沒有DefaultGateKeeper集。它看起來像一個錯誤,而不是一個未經授權的問題 - 但我不知道如何獲得更多細節,我只是有堆棧跟蹤告訴我,所以出錯了 – 2015-04-16 13:43:11

回答

2

如果您使用的DefaultPlaceManager,請確保您已綁定DefaultPlace,ErrorPlace和UnauthorizedPlace您的杜松子酒模塊中的演示者名稱標記。 From DefaultPlaceManager's javadoc(http://arcbees.github.io/GWTP/javadoc/apidocs/com/gwtplatform/mvp/client/proxy/DefaultPlaceManager.html):

重要!如果您使用此課程,請不要忘記將DefaultPlace, ErrorPlace和UnauthorizedPlace綁定到您的杜松子酒 模塊中的演示者名稱標記。

注意:默認,錯誤和未經授權的地方顯示沒有 更新瀏覽器的URL(因此在 revealPlace傳遞錯誤值)。如果用戶返回(使用瀏覽器的後退按鈕),這將避免進入無限導航 循環。

下面是我們要避免無限導航循環的例子:

未經驗證的命中#admin的#unauthorized地方顯露(預留驗證 管理員的地方),以及瀏覽器的URL被 更新#unauthorized用戶點擊其 瀏覽器中的後退按鈕,登陸#admin,然後#unauthorized,然後#admin等。

此外,從https://github.com/ArcBees/GWTP/issues/296

驗證代理的在你的演示界面從 ProxyPlace繼承。

+0

嗨感謝迴應 - 我想真正的問題不是爲什麼我得到循環(我知道,我真的應該有一個錯誤的地方等),但爲什麼它甚至顯示錯誤呢?這是去一個有效的地方(overrode revealErrorPlace和添加日誌記錄來獲取錯誤標記),但它試圖揭示錯誤的地方,而我不明白爲什麼 – 2015-04-15 20:34:01

+0

我使用自定義的placemanager ClientPlaceManager,但我仍然如果切換到默認設置並將地點綁定到沒有關守的姓名密碼,則會出現相同問題 – 2015-04-16 13:52:42

+0

'驗證Presenter中代理服務器的接口是否繼承ProxyPlace。'幫助我 - 沒有在GWTP intellij插件中檢查「創建爲地方」 - 這是一個很難理解的問題,非常感謝! – 2016-08-11 08:45:39

相關問題