|
I am working with a database that is kind
of strange. Someone provides a new
table with each day’s data. Thus,
the database can cause an SQLException as a normal result for the use case
where the user requests data that hasn’t been produced yet. When my “Iterator IDataprovider.iterate(int
first, int count)” method is called and I go to the database, I would
like to handle the SQLException to call “void Component.setResponsePage(
Class.responsePage)" to tell the user what has happened, passing in
PageParameters to enable the user to continue. It seems that DataTable does not like me
jumping out of the “iterate(first,count)” method like that. It tries to set the ResponsePage to the
Wicket error page, which causes a serious failure saying that one cannot set
the ResponsePage twice. What are my options for solving this
problem? Is it simply a matter of making my “iterate(first,count)
return an empty iterator to satisfy the DataTable caller before my “setResponsePage()”
can take effect? Here is the relevant section from the
Tomcat logfile: INFO:
org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
Redirect URL: http://jakarta.apache.org]] INFO: ContextListener:
contextInitialized() INFO: SessionListener:
contextInitialized() INFO: ContextListener:
contextInitialized() INFO: SessionListener:
contextInitialized() SEVERE: Servlet.service() for servlet
MEM_Application threw exception wicket.WicketRuntimeException: Internal
Error: Could not render error page class
wicket.markup.html.pages.InternalErrorPage at
wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:106) at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) at
wicket.RequestCycle.step(RequestCycle.java:971) at
wicket.RequestCycle.steps(RequestCycle.java:1005) at
wicket.RequestCycle.request(RequestCycle.java:451) at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212) at
wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:250) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at
java.lang.Thread.run(Thread.java:595) Caused by: wicket.WicketRuntimeException:
Already redirecting to '/MEMSpssWebModule/mem?wicket:interface=:0:1:'. Cannot
redirect more than once at
wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:88) at
wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:205) at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60) at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49) at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66) at
wicket.RequestCycle.respond(RequestCycle.java:877) at
wicket.RequestCycle.step(RequestCycle.java:946) ...
20 more INFO: ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@13ac14d') INFO: ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@68d505') INFO: ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@7973e4') INFO: SessionListener: contextDestroyed() INFO: ContextListener: contextDestroyed() INFO: ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@4a5320') INFO: ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@1978622') INFO: ContextListener:
attributeReplaced('org.apache.catalina.WELCOME_FILES',
'[Ljava.lang.String;@e73783') INFO: SessionListener: contextDestroyed() INFO: ContextListener: contextDestroyed() |
- [Wicket-user] DataTable and IDataProvider question Frank Silbermann
- Re: [Wicket-user] DataTable and IDataProvider questi... Igor Vaynberg
- RE: [Wicket-user] DataTable and IDataProvider questi... Frank Silbermann
- Re: [Wicket-user] DataTable and IDataProvider qu... Igor Vaynberg
- RE: [Wicket-user] DataTable and IDataProvider questi... Frank Silbermann
- Re: [Wicket-user] DataTable and IDataProvider qu... Igor Vaynberg
- RE: [Wicket-user] DataTable and IDataProvider questi... Frank Silbermann
- Re: [Wicket-user] DataTable and IDataProvider qu... Igor Vaynberg
