You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Hendy Irawan <he...@soluvas.com> on 2013/09/24 08:36:25 UTC

StalePageException's followed by "An error occurred while checking whether a page is stateless. Assuming it is stateful."

We're getting a lot of StalePageException, immediately followed by "An error
occurred while checking whether a page is stateless. Assuming it is
stateful." on stateful pages and especially when crawled by Google bot.

Any idea why this is happening?

@timestamp	  	2013-09-24T01:42:47-04:00
caller	  	Caller+0	 at
org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerStack.java:184)
Caller+1	 at
org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:636)
Caller+2	 at
org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:589)
Caller+3	 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
Caller+4	 at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
level	  	ERROR
logger	  	org.apache.wicket.request.RequestHandlerStack
message	  	Error detaching RequestHandler
req.queryString	  
0-1.IBehaviorListener.1-productStatusPanel-addToCartRegion-1-productCartComposeForm-quantityProductPanel-quantity
req.remoteHost	  	127.0.0.1
req.requestURI	  
/tuneeca_prd_commerce/app/product/gamis-je-t-aime-champs-elyses
req.requestURL	  
http://localhost:8201/tuneeca_prd_commerce/app/product/gamis-je-t-aime-champs-elyses
req.sessionId	  	369EExxxx
req.userAgent	  	Mozilla/5.0 (compatible; Googlebot/2.1;
+http://www.google.com/bot.html)
req.xForwardedFor	  	66.249.66.172
thread	  	http-nio-8201-exec-17
throwable	  	org.apache.wicket.core.request.mapper.StalePageException: null

followed by :

@timestamp	  	2013-09-24T01:42:47-04:00
caller	  	Caller+0	 at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:170)
Caller+1	 at
org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98)
Caller+2	 at
org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:73)
Caller+3	 at
org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:281)
Caller+4	 at org.apache.wicket.Application$2.onDetach(Application.java:1628)
level	  	WARN
logger	  	org.apache.wicket.page.RequestAdapter
message	  	An error occurred while checking whether a page is stateless.
Assuming it is stateful.
req.queryString	  
0-1.IBehaviorListener.1-productStatusPanel-addToCartRegion-1-productCartComposeForm-quantityProductPanel-quantity
req.remoteHost	  	127.0.0.1
req.requestURI	  
/tuneeca_prd_commerce/app/product/gamis-je-t-aime-champs-elyses
req.requestURL	  
http://localhost:8201/tuneeca_prd_commerce/app/product/gamis-je-t-aime-champs-elyses
req.sessionId	  	369EE916xxxx
req.userAgent	  	Mozilla/5.0 (compatible; Googlebot/2.1;
+http://www.google.com/bot.html)
req.xForwardedFor	  	66.249.66.172
thread	  	http-nio-8201-exec-17
throwable	  	java.lang.NullPointerException: null
	at
id.co.bippo.product.web.pub.ProductShowPage.getAddToCartRegion(ProductShowPage.java:207)
~[id.co.bippo.product.web-5.1.0-SNAPSHOT.jar:na]
	at
id.co.bippo.springapp.SoluvasWebApplication.composeComponent(SoluvasWebApplication.java:377)
~[SoluvasWebApplication.class:na]
	at
id.co.bippo.springapp.SoluvasWebApplication$1.onInitialize(SoluvasWebApplication.java:352)
~[SoluvasWebApplication$1.class:na]
	at
org.apache.wicket.application.ComponentInitializationListenerCollection$1.notify(ComponentInitializationListenerCollection.java:40)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.application.ComponentInitializationListenerCollection$1.notify(ComponentInitializationListenerCollection.java:36)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
~[wicket-util-6.8.0.jar:6.8.0]
	at
org.apache.wicket.application.ComponentInitializationListenerCollection.onInitialize(ComponentInitializationListenerCollection.java:35)
~[wicket-core-6.8.0.jar:6.8.0]
	at org.apache.wicket.Component.fireInitialize(Component.java:873)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:955)
~[wicket-core-6.8.0.jar:6.8.0]
	at org.apache.wicket.Page.isPageStateless(Page.java:451)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:166)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:73)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:281)
~[wicket-core-6.8.0.jar:6.8.0]
	at org.apache.wicket.Application$2.onDetach(Application.java:1628)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:120)
~[wicket-util-6.8.0.jar:6.8.0]
	at
org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)
~[wicket-util-6.8.0.jar:6.8.0]
	at
org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:113)
~[wicket-util-6.8.0.jar:6.8.0]
	at
org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:640)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:589)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
~[wicket-core-6.8.0.jar:6.8.0]
	at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
~[wicket-core-6.8.0.jar:6.8.0]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler$CustomFilterChain.doFilter(SoluvasAtmosphereHandler.java:195)
~[SoluvasAtmosphereHandler$CustomFilterChain.class:na]
	at
org.soluvas.web.site.servlet.ShiroPrincipalsServletFilter.doFilter(ShiroPrincipalsServletFilter.java:59)
~[org.soluvas.web.site-2.0.0-20130923.174406-516.jar:na]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler$CustomFilterChain.doFilter(SoluvasAtmosphereHandler.java:195)
~[SoluvasAtmosphereHandler$CustomFilterChain.class:na]
	at
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
~[shiro-web-1.2.2.jar:1.2.2]
	at
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
~[shiro-web-1.2.2.jar:1.2.2]
	at
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
~[shiro-core-1.2.2.jar:1.2.2]
	at
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
~[shiro-core-1.2.2.jar:1.2.2]
	at
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
~[shiro-core-1.2.2.jar:1.2.2]
	at
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
~[shiro-web-1.2.2.jar:1.2.2]
	at
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
~[shiro-web-1.2.2.jar:1.2.2]
	at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
~[spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
~[spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler$CustomFilterChain.doFilter(SoluvasAtmosphereHandler.java:195)
~[SoluvasAtmosphereHandler$CustomFilterChain.class:na]
	at
org.soluvas.web.site.servlet.MoreMdcServletFilter.doFilter(MoreMdcServletFilter.java:62)
~[org.soluvas.web.site-2.0.0-20130923.174406-516.jar:na]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler$CustomFilterChain.doFilter(SoluvasAtmosphereHandler.java:195)
~[SoluvasAtmosphereHandler$CustomFilterChain.class:na]
	at
ch.qos.logback.classic.helpers.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:51)
~[logback-classic-1.0.12.jar:na]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler$CustomFilterChain.doFilter(SoluvasAtmosphereHandler.java:195)
~[SoluvasAtmosphereHandler$CustomFilterChain.class:na]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler$CustomFilterChain.invokeFilterChain(SoluvasAtmosphereHandler.java:181)
~[SoluvasAtmosphereHandler$CustomFilterChain.class:na]
	at
id.co.bippo.springapp.SoluvasAtmosphereHandler.onRequest(SoluvasAtmosphereHandler.java:80)
~[SoluvasAtmosphereHandler.class:na]
	at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:260)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:167)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.atmosphere.container.Tomcat7CometSupport.service(Tomcat7CometSupport.java:88)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket.doService(Tomcat7AsyncSupportWithWebSocket.java:63)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:87)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket.service(Tomcat7AsyncSupportWithWebSocket.java:59)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1459)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:361)
~[atmosphere-runtime-1.0.17.jar:1.0.17]
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:484)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:377)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
~[tomcat-catalina-7.0.30.jar:7.0.30]
	at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
~[tomcat-coyote-7.0.30.jar:7.0.30]
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
~[tomcat-coyote-7.0.30.jar:7.0.30]
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
~[tomcat-coyote-7.0.30.jar:7.0.30]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
~[na:1.7.0_25]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
~[na:1.7.0_25]
	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]


Notes:

* the NPE id.co.bippo.product.web.pub.ProductShowPage.getAddToCartRegion()
is simply calling a method on a Component  (saved in field) that's supposed
to be created during the ProductShowPage's constructor. So it seems either
the constructor wasn't properly called/finished or something else happened,
so the component was null.

* our site's usage pattern is:
- for frontend, a lot of concurrent users (50-100s), all accessing stateful
pages, and usually they open several tabs
- for the backend, several concurrent users (15s), all accessing stateful
pages, and each open 10-20 tabs

* configuration is deployment. However wicket-devutils.jar is on the
WEB-INF/lib (because the same dependency is required during development),
does this affect?

* Tomcat 7.0 on Oracle JDK 7 on Ubuntu 12.10 64-bit
* using Tomcat's PersistentManager FileStore for session

I found a couple of threads related to StalePageException in Wicket 1.5 :

1.
http://apache-wicket.1842946.n4.nabble.com/StalePageException-handling-issue-td4579247.html
2.
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-td4649492.html

But these are for Wicket 1.5 so I'm not sure if it applies.

Any suggestion would be appreciated.

Thank you.

Hendy



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/StalePageException-s-followed-by-An-error-occurred-while-checking-whether-a-page-is-stateless-Assumi-tp4661457.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: StalePageException's followed by "An error occurred while checking whether a page is stateless. Assuming it is stateful."

Posted by Hendy Irawan <he...@soluvas.com>.
Hi,

I'm not sure if this is related, I'm suspecting the StalePageException's are
a cause to this: sometimes the page response are "misrouted" from the
request:

1. A user clicks an AjaxLink/AjaxButton, but gets redirected to a totally
unrelated page (like the search page) which seems to be for another HTTP
request
2. A user clicks a BookmarkablePageLink, but gets redirected to a totally
unrelated page (like the search page) which seems to be for another HTTP
request
3. A user clicks a BookmarkablePageLink, but the browser then displays a
Wicket AJAX XML response for totally unrelated request

With a concurrent user of around 50, this happens in about 1 out of 100
clicks for a single user.

BTW we're using Wicket 6.8.0, the NIO HTTP Connector and Atmosphere 0.10.

Any idea how this could happen? Or a way to diagnose the cause?

Hendy



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/StalePageException-s-followed-by-An-error-occurred-while-checking-whether-a-page-is-stateless-Assumi-tp4661457p4661458.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: StalePageException's followed by "An error occurred while checking whether a page is stateless. Assuming it is stateful."

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Sep 24, 2013 at 8:14 PM, Gabriel Landon <gl...@piti.pf> wrote:

> Hi,
>
> It happens to me once. It was because I was using a model on a page that
> was
> not detached.
>
> Have a look at your ProductShowPage.class and check that you have overrides
> onDetach() :
>     /**
>       * @see org.apache.wicket.Page#onDetach()
>     */
>     @Override
>     protected void onDetach() {
>             // Detach all your models
>
>             super.onDetach();
>     }
>
> What I find strange is that the detach function of the request call
> Page#isPageStateless() that does an MarkupContainer#internalInitialize()
> that may reinitialized all components (and pages) if they were not
> initialized before!
>

Usually the first call to Page#isPageStateless() is when the page is about
to be rendered
(org.apache.wicket.request.handler.render.WebPageRenderer#respond())
Later calls to Page#isPageStateless() may call #internalInitialize() but it
does nothing because a flag is saved that the component (the page) is
already initialized.
See org.apache.wicket.Component#fireInitialize


>
> Regards,
>
> Gabriel.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/StalePageException-s-followed-by-An-error-occurred-while-checking-whether-a-page-is-stateless-Assumi-tp4661457p4661482.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: StalePageException's followed by "An error occurred while checking whether a page is stateless. Assuming it is stateful."

Posted by Gabriel Landon <gl...@piti.pf>.
Hi,

It happens to me once. It was because I was using a model on a page that was
not detached.

Have a look at your ProductShowPage.class and check that you have overrides
onDetach() : 
    /**
      * @see org.apache.wicket.Page#onDetach()
    */
    @Override
    protected void onDetach() {
	    // Detach all your models 
    	
	    super.onDetach();
    }

What I find strange is that the detach function of the request call
Page#isPageStateless() that does an MarkupContainer#internalInitialize()
that may reinitialized all components (and pages) if they were not
initialized before!

Regards,

Gabriel.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/StalePageException-s-followed-by-An-error-occurred-while-checking-whether-a-page-is-stateless-Assumi-tp4661457p4661482.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org