Hey Martin,

 

So I put in my breakpoint and it looks like that my page store is always empty, 
is always being invalidated by two repeated stack traces that come in the 
following order:

 

http-thread-pool-5311(1)@8339 daemon, prio=5, in group 'grizzly-kernel', 
status: 'RUNNING'

                  at 
org.apache.wicket.pageStore.DefaultPageStore.removePageData(DefaultPageStore.java:109)

                  at 
org.apache.wicket.pageStore.DefaultPageStore.unbind(DefaultPageStore.java:161)

                  at 
org.apache.wicket.page.PageStoreManager$SessionEntry.valueUnbound(PageStoreManager.java:307)

                  at 
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1738)

                  at 
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:178)

                  at 
org.apache.wicket.session.HttpSessionStore.setAttribute(HttpSessionStore.java:344)

                  at org.apache.wicket.Session.setAttribute(Session.java:848)

                  at 
org.apache.wicket.page.DefaultPageManagerContext.setSessionAttribute(DefaultPageManagerContext.java:99)

                  at 
org.apache.wicket.page.RequestAdapter.setSessionAttribute(RequestAdapter.java:89)

                  at 
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getSessionEntry(PageStoreManager.java:378)

                  at 
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:349)

                  at 
org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:107)

                  at 
org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:52)

                  at 
org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:257)

                  at 
org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:148)

                  at 
org.apache.wicket.core.request.handler.PageProvider.getStoredPage(PageProvider.java:296)

                  at 
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:261)

                  at 
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)

                  at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:96)

                  at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:157)

                  at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)

                  at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)

                  at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)

                  at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)

                  at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)

                  at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)

                  at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)

                  at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)

 

Fallowed by:

 

http-thread-pool-5311(1)@8339 daemon, prio=5, in group 'grizzly-kernel', 
status: 'RUNNING'

                  at 
org.apache.wicket.pageStore.DefaultPageStore.removePageData(DefaultPageStore.java:109)

                  at 
org.apache.wicket.pageStore.DefaultPageStore.unbind(DefaultPageStore.java:161)

                  at 
org.apache.wicket.page.PageStoreManager$SessionEntry.valueUnbound(PageStoreManager.java:307)

                  at 
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1738)

                  at 
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:178)

                  at 
org.apache.wicket.session.HttpSessionStore.setAttribute(HttpSessionStore.java:344)

                  at org.apache.wicket.Session.setAttribute(Session.java:848)

                  at 
org.apache.wicket.page.DefaultPageManagerContext.setSessionAttribute(DefaultPageManagerContext.java:99)

                  at 
org.apache.wicket.page.RequestAdapter.setSessionAttribute(RequestAdapter.java:89)

                  at 
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getSessionEntry(PageStoreManager.java:378)

                  at 
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:405)

                  at 
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181)

                  at 
org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98)

                  at 
org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:73)

                  at 
org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:281)

                  at 
org.apache.wicket.Application$2.onDetach(Application.java:1628)

                  at 
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105)

                  at 
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)

                  at 
org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:120)

                  at 
org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)

                  at 
org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:113)

                  at 
org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100)

                  at 
org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:640)

                  at 
org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:589)

                  at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)

                  at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)

                  at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)

                  at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)

 

This happens for each page request and as soon as a form is submitted the back 
button redirects the user to the page expired for good reason (page store is 
empty).

 

I also noticed that the work done for WICKET-3865 is not registering the 
DebugPageManagerProvider which I added inside my init’s method via:

setPageManagerProvider(new DebugPageManagerProvider(WicketApplication.this));

 

Please advise.

 

From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, September 26, 2013 3:13 AM
To: users@wicket.apache.org
Cc: Paul Bors
Subject: Re: Bunch of Page Expired exceptions in Wicket 6.10.0

 

Hi,

 

DEBUG: 09/25 17:35:40.956: PageAccessSynchronizer: http-thread-pool-5311(4)
acquired lock to page 53

DEBUG: 09/25 17:35:40.957: DiskDataStore: Removing data for pages in session
with id '702b17085b39e8a599d07e81df51'

DEBUG: 09/25 17:35:40.960: DiskDataStore: Returning data(null) for page with
id '53' in session with id '702b17085b39e8a599d07e81df51'

 

 

The second log leads to the problem. It seems the session is invalidated...

Put a breakpoint at org.apache.wicket.pageStore.DefaultPageStore#removePageData 
and see who calls it.

 

On Thu, Sep 26, 2013 at 5:04 AM, Paul Borș <p...@bors.ws> wrote:

I think I found my answer here:
https://cwiki.apache.org/confluence/display/WICKET/Page+Storage

I'll grab the Wicket sources tomorrow and hook my IntelliJ IDEA debugger to the 
DiskDataStore and work it backwards to see what happens.

Stay tuned... ;)

Have a great day,
    Paul Bors


> On Sep 25, 2013, at 5:59 PM, Paul Bors <p...@bors.ws> wrote:
>
> Hey guys,
>
> Just wondering what could be the cause of the many page expired exceptions I 
> am running into with this webapp whenever the user changes tabs and then 
> selects the browser’s “Back” button or whenever the user downloads a resource 
> via a button and the form is being submitted a second time.
>
> My first guess is that the page might have issues with its stateless flags 
> but help is welcomed as I’m still new to Wicket 6.x.
>
> If needed I can create a quick-start.
>
> The following is an example of the log right after the button has been hit a 
> second time to submit the form:
>
> DEBUG: 09/25 17:35:40.954: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.955: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.955: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.956: CompoundRequestMapper: One compatible mapper found 
> for URL 'wicket/page?53-1.IFormSubmitListener-exportForm' -> 'Mapper: 
> org.apache.wicket.core.request.mapper.PageInstanceMapper; Score: 2147483647'
> DEBUG: 09/25 17:35:40.956: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.956: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> attempting to acquire lock to page with id '53'
> DEBUG: 09/25 17:35:40.956: PageAccessSynchronizer: http-thread-pool-5311(4) 
> acquired lock to page 53
> DEBUG: 09/25 17:35:40.957: DiskDataStore: Removing data for pages in session 
> with id '702b17085b39e8a599d07e81df51'
> DEBUG: 09/25 17:35:40.960: DiskDataStore: Returning data(null) for page with 
> id '53' in session with id '702b17085b39e8a599d07e81df51'
> DEBUG: 09/25 17:35:40.960: AsynchronousDataStore: Returning the data of a 
> stored entry with sessionId '702b17085b39e8a599d07e81df51' and pageId '53'
> DEBUG: 09/25 17:35:40.961: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> released lock to page with id '53'
> DEBUG: 09/25 17:35:40.961: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> notifying blocked threads
> DEBUG: 09/25 17:35:40.961: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.964: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> attempting to acquire lock to page with id '55'
> DEBUG: 09/25 17:35:40.964: PageAccessSynchronizer: http-thread-pool-5311(4) 
> acquired lock to page 55
> DEBUG: 09/25 17:35:40.966: MarkupContainer: Add homePageLink to [Page class = 
> org.apache.wicket.markup.html.pages.PageExpiredErrorPage, id = 55, render 
> count = 0]
> DEBUG: 09/25 17:35:40.966: Component: Begin render [Page class = 
> org.apache.wicket.markup.html.pages.PageExpiredErrorPage, id = 55, render 
> count = 1]
> DEBUG: 09/25 17:35:40.967: MarkupContainer: Add _header_0 to [Page class = 
> org.apache.wicket.markup.html.pages.PageExpiredErrorPage, id = 55, render 
> count = 1]
> DEBUG: 09/25 17:35:40.967: Component: Begin render [HtmlHeaderContainer 
> [Component id = _header_0]]
> DEBUG: 09/25 17:35:40.967: Component: renderHead: [BookmarkablePageLink 
> [Component id = homePageLink]]
> DEBUG: 09/25 17:35:40.967: Component: renderHead: [HtmlHeaderContainer 
> [Component id = _header_0]]
> DEBUG: 09/25 17:35:40.967: Component: renderHead: [PageExpiredErrorPage 
> [Component id = 55]]
> DEBUG: 09/25 17:35:40.968: Component: End render [HtmlHeaderContainer 
> [Component id = _header_0]]
> DEBUG: 09/25 17:35:40.968: Component: Begin render [BookmarkablePageLink 
> [Component id = homePageLink]]
> DEBUG: 09/25 17:35:40.969: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.970: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.970: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.970: ServletWebRequest: Calculating context relative 
> path from: context path '', filterPrefix 'app/', uri '/app/wicket/page'
> DEBUG: 09/25 17:35:40.971: Component: End render [BookmarkablePageLink 
> [Component id = homePageLink]]
> DEBUG: 09/25 17:35:40.971: Component: End render [Page class = 
> org.apache.wicket.markup.html.pages.PageExpiredErrorPage, id = 55, render 
> count = 1]
> DEBUG: 09/25 17:35:40.971: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> attempting to acquire lock to page with id '53'
> DEBUG: 09/25 17:35:40.971: PageAccessSynchronizer: http-thread-pool-5311(4) 
> acquired lock to page 53
> DEBUG: 09/25 17:35:40.972: DiskDataStore: Returning data(null) for page with 
> id '53' in session with id '702b17085b39e8a599d07e81df51'
> DEBUG: 09/25 17:35:40.972: AsynchronousDataStore: Returning the data of a 
> stored entry with sessionId '702b17085b39e8a599d07e81df51' and pageId '53'
> DEBUG: 09/25 17:35:40.972: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> released lock to page with id '53'
> DEBUG: 09/25 17:35:40.972: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> notifying blocked threads
> DEBUG: 09/25 17:35:40.972: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> attempting to acquire lock to page with id '53'
> DEBUG: 09/25 17:35:40.972: PageAccessSynchronizer: http-thread-pool-5311(4) 
> acquired lock to page 53
> DEBUG: 09/25 17:35:40.973: DiskDataStore: Returning data(null) for page with 
> id '53' in session with id '702b17085b39e8a599d07e81df51'
> DEBUG: 09/25 17:35:40.973: AsynchronousDataStore: Returning the data of a 
> stored entry with sessionId '702b17085b39e8a599d07e81df51' and pageId '53'
> DEBUG: 09/25 17:35:40.973: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> released lock to page with id '53'
> DEBUG: 09/25 17:35:40.973: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> notifying blocked threads
> DEBUG: 09/25 17:35:40.973: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> attempting to acquire lock to page with id '53'
> DEBUG: 09/25 17:35:40.973: PageAccessSynchronizer: http-thread-pool-5311(4) 
> acquired lock to page 53
> DEBUG: 09/25 17:35:40.974: DiskDataStore: Returning data(null) for page with 
> id '53' in session with id '702b17085b39e8a599d07e81df51'
> DEBUG: 09/25 17:35:40.974: AsynchronousDataStore: Returning the data of a 
> stored entry with sessionId '702b17085b39e8a599d07e81df51' and pageId '53'
> DEBUG: 09/25 17:35:40.974: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> released lock to page with id '53'
> DEBUG: 09/25 17:35:40.974: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> notifying blocked threads
> DEBUG: 09/25 17:35:40.974: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> attempting to acquire lock to page with id '53'
> DEBUG: 09/25 17:35:40.974: PageAccessSynchronizer: http-thread-pool-5311(4) 
> acquired lock to page 53
> DEBUG: 09/25 17:35:40.975: DiskDataStore: Returning data(null) for page with 
> id '53' in session with id '702b17085b39e8a599d07e81df51'
> DEBUG: 09/25 17:35:40.975: AsynchronousDataStore: Returning the data of a 
> stored entry with sessionId '702b17085b39e8a599d07e81df51' and pageId '53'
> DEBUG: 09/25 17:35:40.975: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> released lock to page with id '53'
> DEBUG: 09/25 17:35:40.975: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> notifying blocked threads
> DEBUG: 09/25 17:35:40.975: Page: ending request for page [Page class = 
> org.apache.wicket.markup.html.pages.PageExpiredErrorPage, id = 55, render 
> count = 1], request 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest@5b454b
> DEBUG: 09/25 17:35:40.975: Page: ending request for page [Page class = 
> org.apache.wicket.markup.html.pages.PageExpiredErrorPage, id = 55, render 
> count = 1], request 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest@5b454b
> DEBUG: 09/25 17:35:40.976: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> released lock to page with id '55'
> DEBUG: 09/25 17:35:40.976: PageAccessSynchronizer: 'http-thread-pool-5311(4)' 
> notifying blocked threads

 

Reply via email to