I may have found something - but first another question: under which conditions would an ajax wicket:interface request omit a 'version'? (I see request processor then assumes that the version is 0).
I may have found a race condition: - check out this<http://www.sears.com/shc/s/nb_10153_12605_NB_EnergyStar+Program+Information?adCell=W4>page - observe that it has 2 iframes: a map on the left and a rebate search form on the right. both are served up from our servers (likely the same box) - tabbing out of the zipCode field issues a validation Ajax request; the submit button is actually a SubmitLink (i.e. also uses JS wicket:interface). - The StateProgramDetailsPage page mentioned in the exceptions is what you see when you click on a particular US state on the map - say NY - It's possible that the form on the right is the source of wicket:interface requests causing the exceptions When a version-less wicket:interface request arrives (say, on tab-out from zip code field) eventually SecondLevelCacheSessionStore.get(id, version) gets called wherein we can fall through to a if-branch that picks *the last page rendered*. I realize that id is generated atomically, so in theory the following code should be safe, but it is curious that getLastPage() is called 3 times (instead of being called once to init a local variable). So I'd imagine it's possible that the map of the left sometimes gets rendered later (say *after if (getLastPage() != null && getLastPage().getNumericId() == id) is evaluated) and thus subsequent "pages.put(id, page);" then stores the 'map' page with the 'form' page's id. No?* String sessionId = getSession().getId(); if (sessionId != null) { if (getLastPage() != null && getLastPage().getNumericId() == id) { page = versionNumber != -1 ? getLastPage().getVersion(versionNumber) : getLastPage(); if (page != null) { // ask the page store if it is ready saving the page. getStore().pageAccessed(sessionId, page); pages.put(id, page); return page; } } setLastPage(null); page = getStore().getPage(sessionId, getName(), id, versionNumber, -1); pages.put(id, page); return page; } On Sat, Mar 20, 2010 at 3:53 PM, Nikita Tovstoles < nikita.tovsto...@gmail.com> wrote: > OK, here's what I can surmise thus far: > > - Only 'wicket:interface' JS requests - from 'onchange' Ajax validator > or from a SubmitLink-initiated form submission trigger the exception > - the form being submitted or validated is in a couple of pages but *never > *in *StateProgramDetailsPage* > - the exceptions thrown only cites *StateProgramDetailsPage* > - pages are mounted using HybridURLCodingStrategy and have a common > (concrete) super class > - in all wicket:interface requests resulting in the exception: pageId = > 0; 'version' is always empty (thus wicket defaults to 0) > > So, in summary, *sometimes* form component Ajax validation or non-Ajax > form submission wicket:interface POST requests results in retrieval of the > incorrect page - StateProgramDetailsPage - from PageMap. Consequently, the > exceptions are thrown. I would appreciate any general thoughts, but also > answers to these questions (to help us understand what goes on under the > hood): > > - What logs should we enable to see why an ajax wicket:interface from > one page resolves to another page? > - Does Wicket Ever manually write out JSESSIONID? In 'wicket:interface' > requests specifically? or is that left up to the servlet container? > - What is PageMap's scope - one per HttpSession? > - What's 'urlDepth'? > - What's the lifecycle of a IRequestCycleProcessor > and IRequestCodingStrategy? Is newXXX called only once per app? > - If we wanted to rule out DiskPageStore by installing an in-memory > page store instead how can we do so? Implement own IPageStore? > > * > > > * > > *Request 1* > * > > 10.242.46.21 - - [20/Mar/2010:17:41:09 -0400] "POST > /?wicket:interface=:0:EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:submitLink::IActivePageBehaviorListener:0:10&wicket:ignoreIfNotActive=true&random=0.04114457813227995 > HTTP/1.1" 200 161 > "http://rebatefinder.ecorebates.com/embedded/form/category/style/vertical/siteId/sears/adCell/W4/layout/vertical.0;jsessionid=9F0B9124A90DB552A38D2F8E6476F814" > "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6.4; > .NET CLR 1.1.4322)" > > Exception 1 > > Caused by: org.apache.wicket.WicketRuntimeException: component > EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:submitLink not > found on page com.castanealabs.gui.interactivemap.StateProgramDetailsPage[id > = 0], listener interface = [RequestListenerInterface > name=IActivePageBehaviorListener, method=public abstract void > org.apache.wicket.behavior.IBehaviorListener.onRequest()] > at > org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426) > at > org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471) > > Request 2 > > 10.242.46.21 - - [20/Mar/2010:17:39:07 -0400] "POST > /?wicket:interface=:0:EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:zipCodeComponent:zipCode::IBehaviorListener:1:10&random=0.46530282930252486 > HTTP/1.1" 200 161 > "http://rebatefinder.ecorebates.com/embedded/form/category/style/vertical/siteId/sears/adCell/W4/layout/vertical.0;jsessionid=C767AD19F2AD165C8F4F7F00C337D385" > "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET > CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; msn OptimizedIE8;ENUS)" > > Exception 2 > > * > > > Caused by: org.apache.wicket.WicketRuntimeException: component > EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:zipCodeComponent:zipCode > not found on page > com.castanealabs.gui.interactivemap.StateProgramDetailsPage[id = 0], listener > interface = [RequestListenerInterface name=IBehaviorListener, method=public > abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] > at > org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor. > java:426) > at > org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471) > at > org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144) > ... 21 more > > On Sat, Mar 20, 2010 at 1:30 PM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote: > >> i doubt its the diskstore since you are the only one seeing this problem. >> >> is this happening on multiple pages or just a particular one? >> >> -igor >> >> On Sat, Mar 20, 2010 at 10:34 AM, Nikita Tovstoles >> <nikita.tovsto...@gmail.com> wrote: >> > I wonder if this is a serialization problem: >> > >> > the following request: >> > >> > 10.242.46.21 - - [20/Mar/2010:13:04:19 -0400] "POST >> > >> /?wicket:interface=:0:EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:zipCodeComponent:zipCode::IBehaviorListener:1:10&random=0.014624584217842351 >> > HTTP/1.1" 200 161 >> > >> > >> > results in this exception: >> > >> > Caused by: org.apache.wicket.WicketRuntimeException: component >> > >> EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:zipCodeComponent:zipCode >> > not found on page >> > com.castanealabs.gui.interactivemap.*StateProgramDetailsPage*[id = 0], >> > listener interface = [RequestListenerInterface name=IBehaviorListener, >> > method=public abstract void >> > org.apache.wicket.behavior.IBehaviorListener.onRequest()] >> > at >> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426) >> > >> > >> > The problem is, *StateProgramDetailsPage indeed does not contain a >> > EmbeddedCategoryCriteriaPanel in its' hierarchy. So why did wicket >> decide >> > that it does? The is another page class that does contain a >> > EmbeddedCategoryCriteriaPanel. >> > That class shares a concrete superclass with StateProgramDetailsPage >> class. >> > That superclass defines a serialVersionUID. * >> > * >> > * >> > *It appears that DiskPageStore is loading instance of the wrong page >> class. >> > Not sure why... could the fact that the classes share a common >> superclass >> > with a serialVersionUID be the reason? Doubt it but have no other ideas >> at >> > the moment.* >> > * >> > * >> > * >> > * >> > Aside: Is there such a thing as an in-memory IPageStore impl (as a >> band-aid >> > at least...) >> > >> > On Sat, Mar 20, 2010 at 10:11 AM, Nikita Tovstoles < >> > nikita.tovsto...@gmail.com> wrote: >> > >> >> We're suddenly seeing a fair number of exceptions like one below. >> Thought >> >> the root cause is failing session affinity in our clusters, but the >> >> exceptions persist even after we shut down all but one host behind >> HAProxy. >> >> I realize the question is somewhat ambiguous, but what - besides lack >> of >> >> session affinity - can be some other causes of these exceptions? >> >> >> >> thanks >> >> -nikita >> >> >> >> 12:56:37,612 ERROR RequestCycle:1521 - submitted http post value >> [check3] for CheckGroup component >> [0:EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:brandsComponent:brands] >> contains an illegal relative path element [check3] which does not point to a >> Check component. Due to this the CheckGroup component cannot resolve the >> selected Check component pointed to by the illegal value. A possible reason >> is that componment hierarchy changed between rendering and form submission. >> >> org.apache.wicket.WicketRuntimeException: submitted http post value >> [check3] for CheckGroup component >> [0:EmbeddedCategoryCriteriaPanel:inputPanel:categorySearchForm:brandsComponent:brands] >> contains an illegal relative path element [check3] which does not point to a >> Check component. Due to this the CheckGroup component cannot resolve the >> selected Check component pointed to by the illegal value. A possible reason >> is that componment hierarchy changed between rendering and form submission. >> >> at >> org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:136) >> >> at >> org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:58) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1301) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1192) >> >> at >> org.apache.wicket.markup.html.form.Form$22.validate(Form.java:2132) >> >> at >> org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:171) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:441) >> >> >> >> >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > >