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(DefaultPag
eStore.java:109)
at
org.apache.wicket.pageStore.DefaultPageStore.unbind(DefaultPageStore.j
ava:161)
at
org.apache.wicket.page.PageStoreManager$SessionEntry.valueUnbound(Page
StoreManager.java:307)
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSessi
on.java:1738)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(Standar
dSessionFacade.java:178)
at
org.apache.wicket.session.HttpSessionStore.setAttribute(HttpSessionSto
re.java:344)
at
org.apache.wicket.Session.setAttribute(Session.java:848)
at
org.apache.wicket.page.DefaultPageManagerContext.setSessionAttribute(D
efaultPageManagerContext.java:99)
at
org.apache.wicket.page.RequestAdapter.setSessionAttribute(RequestAdapt
er.java:89)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getSe
ssionEntry(PageStoreManager.java:378)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPa
ge(PageStoreManager.java:349)
at
org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager
.java:107)
at
org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorat
or.java:52)
at
org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSync
hronizer.java:257)
at
org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperCo
ntext.java:148)
at
org.apache.wicket.core.request.handler.PageProvider.getStoredPage(Page
Provider.java:296)
at
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstanc
e(PageProvider.java:261)
at
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(Pa
geProvider.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(R
equestCycle.java:861)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSt
ack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java
:261)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCyc
le.java:218)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R
equestCycle.java:289)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(Wicke
tFilter.java:259)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt
er.java:201)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav
a: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(DefaultPag
eStore.java:109)
at
org.apache.wicket.pageStore.DefaultPageStore.unbind(DefaultPageStore.j
ava:161)
at
org.apache.wicket.page.PageStoreManager$SessionEntry.valueUnbound(Page
StoreManager.java:307)
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSessi
on.java:1738)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(Standar
dSessionFacade.java:178)
at
org.apache.wicket.session.HttpSessionStore.setAttribute(HttpSessionSto
re.java:344)
at
org.apache.wicket.Session.setAttribute(Session.java:848)
at
org.apache.wicket.page.DefaultPageManagerContext.setSessionAttribute(D
efaultPageManagerContext.java:99)
at
org.apache.wicket.page.RequestAdapter.setSessionAttribute(RequestAdapt
er.java:89)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getSe
ssionEntry(PageStoreManager.java:378)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.store
TouchedPages(PageStoreManager.java:405)
at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.jav
a:181)
at
org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageM
anager.java:98)
at
org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerD
ecorator.java:73)
at
org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAcce
ssSynchronizer.java:281)
at
org.apache.wicket.Application$2.onDetach(Application.java:1628)
at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notif
y(RequestCycleListenerCollection.java:105)
at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notif
y(RequestCycleListenerCollection.java:101)
at
org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCo
llection.java:120)
at
org.apache.wicket.util.listener.ListenerCollection.reversedNotify(List
enerCollection.java:144)
at
org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnor
ingExceptions(ListenerCollection.java:113)
at
org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetac
h(RequestCycleListenerCollection.java:100)
at
org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.jav
a:640)
at
org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:
589)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R
equestCycle.java:293)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(Wicke
tFilter.java:259)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt
er.java:201)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav
a: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