You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by paulstar <ri...@gmail.com> on 2012/06/01 19:08:16 UTC
Wicket page has a redirect loop
I am migrating from wicket 1.4 to 1.5. The Chrome browser displays "This
webpage has a redirect loop". I found the following repeated (many times)
message from the log.
Note: other than "ccform" is the wicket:id I used in html markup, none of
them are from my code.
2012-06-01 10:05:09,558 ERROR [org.apache.wicket.DefaultExceptionMapper]
(http-0.0.0.0-8445-2) Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Exception in rendering component:
[MyForm [Component id = ccform]]
at
org.apache.wicket.Component.internalRenderComponent(Component.java:2578)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1534)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1432)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1596)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1571)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:693)
at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
at
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
at
org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1534)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1432)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1596)
at org.apache.wicket.Page.onRender(Page.java:907)
at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:140)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)
at
org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:448)
at org.apache.wicket.Component.getMarkup(Component.java:737)
at
org.apache.wicket.markup.html.list.ListView.getMarkup(ListView.java:662)
at org.apache.wicket.Component.getMarkup(Component.java:737)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.getMarkup(DefaultMarkupSourcingStrategy.java:83)
at
org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:448)
at org.apache.wicket.Component.getMarkup(Component.java:737)
at org.apache.wicket.Component.getMarkupTag(Component.java:1422)
at
org.apache.wicket.Component.getMarkupIdFromMarkup(Component.java:777)
at org.apache.wicket.Component.getMarkupIdImpl(Component.java:1479)
at org.apache.wicket.Component.getMarkupId(Component.java:1525)
at org.apache.wicket.Component.getMarkupId(Component.java:1587)
at
org.apache.wicket.markup.html.form.Form.appendDefaultButtonField(Form.java:1096)
at
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1575)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:72)
at
org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
... 51 more
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-page-has-a-redirect-loop-tp4649664.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: Wicket page has a redirect loop
Posted by paulstar <ri...@gmail.com>.
You are right. I found out the 'markupProvider' is null by debugging, thanks
to Tom to "fores" me to do it.
In Wicket 1.3 & 1.4, I overrided 'getAssociatedMarkupStream(boolean
throwException)' so that the class extends from Fragment doesn't have to
provide 'markupProvider'. After upgraded to Wicket 1.5, I simply set the
'markupProvider' to null so that it compiled, but ran into NPE.
So I changed my code from:
public static class FormField extends Fragment {
public FormField(String markupId, Component c, IModel label, IModel m) {
super("fragmentId", markupId, null, m);
this.labelModel = label;
this.c = c;
}
......
}
to:
public static class FormField extends Fragment {
public FormField(String markupId, Component c, IModel label, IModel m,
MarkupContainer markupProvider) {
super("fragmentId", markupId, markupProvider, m);
this.labelModel = label;
this.c = c;
}
......
}
The problem is there are many 'new FormField()' codes, a big changes.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-page-has-a-redirect-loop-tp4649664p4649746.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: Wicket page has a redirect loop
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
I guess 'markupProvider' is null.
This is improved in 1.5.7 to not fail with NPE.
But even in 1.5.7 your app will fail with :
throw new MarkupNotFoundException("No Markup found for Fragment " + markupId +
" in providing markup container " + getMarkupProvider(container));
For some reason the Fragment's markup cannot be found. Most probably
you have usage of IComponentResolver near by this Fragment...
On Fri, Jun 1, 2012 at 9:02 PM, Thomas Götz <to...@decoded.de> wrote:
> Hm, put a breakpoint in FragmentMarkupSourcingStrategy.java:143 and see what causes the NullPointerException.
>
> -Tom
>
>
> On 01.06.2012 at 19:08 paulstar wrote:
>
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)
>> at
>> org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:448)
>> at org.apache.wicket.Component.getMarkup(Component.java:737)
>> at
>> org.apache.wicket.markup.html.list.ListView.getMarkup(ListView.java:662)
>> at org.apache.wicket.Component.getMarkup(Component.java:737)
>> at
>> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.getMarkup(DefaultMarkupSourcingStrategy.java:83)
>> at
>> org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:448)
>> at org.apache.wicket.Component.getMarkup(Component.java:737)
>> at org.apache.wicket.Component.getMarkupTag(Component.java:1422)
>> at
>> org.apache.wicket.Component.getMarkupIdFromMarkup(Component.java:777)
>> at org.apache.wicket.Component.getMarkupIdImpl(Component.java:1479)
>> at org.apache.wicket.Component.getMarkupId(Component.java:1525)
>> at org.apache.wicket.Component.getMarkupId(Component.java:1587)
>> at
>> org.apache.wicket.markup.html.form.Form.appendDefaultButtonField(Form.java:1096)
>> at
>> org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1575)
>> at
>> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:72)
>> at
>> org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
>> ... 51 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket page has a redirect loop
Posted by Thomas Götz <to...@decoded.de>.
Hm, put a breakpoint in FragmentMarkupSourcingStrategy.java:143 and see what causes the NullPointerException.
-Tom
On 01.06.2012 at 19:08 paulstar wrote:
> Caused by: java.lang.NullPointerException
> at
> org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)
> at
> org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:448)
> at org.apache.wicket.Component.getMarkup(Component.java:737)
> at
> org.apache.wicket.markup.html.list.ListView.getMarkup(ListView.java:662)
> at org.apache.wicket.Component.getMarkup(Component.java:737)
> at
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.getMarkup(DefaultMarkupSourcingStrategy.java:83)
> at
> org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:448)
> at org.apache.wicket.Component.getMarkup(Component.java:737)
> at org.apache.wicket.Component.getMarkupTag(Component.java:1422)
> at
> org.apache.wicket.Component.getMarkupIdFromMarkup(Component.java:777)
> at org.apache.wicket.Component.getMarkupIdImpl(Component.java:1479)
> at org.apache.wicket.Component.getMarkupId(Component.java:1525)
> at org.apache.wicket.Component.getMarkupId(Component.java:1587)
> at
> org.apache.wicket.markup.html.form.Form.appendDefaultButtonField(Form.java:1096)
> at
> org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1575)
> at
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:72)
> at
> org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
> ... 51 more
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org