WICKET-6869 StalePageException does not refresh page
Do not lod Wicket internal exceptions in the detach phase.
Internal exceptions are handled in a special way during the request processing phase. In the detach phase nothing could be done.
In this particular case StalePageException is being thrown in the RequestLogger.
(cherry picked from commit 97fcc5b4e2b72e5c0c8507e12841061fdfdf9771)
diff --git a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
index 33d1335..a40dabe 100644
--- a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
+++ b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
@@ -20,6 +20,7 @@
import org.apache.wicket.Application;
import org.apache.wicket.IMetadataContext;
+import org.apache.wicket.IWicketInternalException;
import org.apache.wicket.MetaDataEntry;
import org.apache.wicket.MetaDataKey;
import org.apache.wicket.Page;
@@ -684,7 +685,10 @@
*/
private void handleDetachException(RuntimeException exception)
{
- log.error("Error detaching RequestCycle", exception);
+ if (!(exception instanceof IWicketInternalException))
+ {
+ log.error("Error detaching RequestCycle", exception);
+ }
}
/**
@@ -919,4 +923,4 @@
}
-}
\ No newline at end of file
+}