Johan,
>which version of wicket are you testing ? (line numbers don't match
with my code)
I use 1.1-b2.
Because what is exactly null in youre place?
setResponsePage() is not doing much...
getRequestCycle().setResponsePage(page);
One of several places where there is a problem.
This one is not corrected on the Web so you can get it yourself if you edit a category:
wicket.WicketRuntimeException: Method public abstract void
wicket.markup.html.form.IFormSubmitListener.onFormSubmitted() of interface
java.lang.reflect.Method threw an exception
at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:506)
at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:562)
at
wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:420)
at
wicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:129)
at wicket.RequestCycle.request(RequestCycle.java:403)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:304)
at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:328)
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: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:497)
... 22 more
Caused by: java.lang.NullPointerException
at wicket.Component.setResponsePage(Component.java:1214)
at
org.wicket.urls.app.view.category.CategoriesPage.update(CategoriesPage.java:153)
at java.util.Observable.notifyObservers(Observable.java:142)
at org.dzenanr.model.Entities.notifyObservers(Entities.java:795)
at org.dzenanr.model.Entities.update(Entities.java:526)
at
org.wicket.urls.app.view.category.CategoryEditForm.onSubmit(CategoryEditForm.java:50)
at wicket.markup.html.form.Form.delegateSubmit(Form.java:428)
at wicket.markup.html.form.Form.process(Form.java:380)
at wicket.markup.html.form.Form.onFormSubmitted(Form.java:212)
... 27 more
so somehow getRequestCycle() returns null ... But i don't know how this
is possible.
Well, I have at many places in my application. Those errors disappear
when I replace, e.g.,
// NullPointerException in edit
setResponsePage(new CategoriesPage());
with
Page categoriesPage = new CategoriesPage();
categoriesPage.onRedirect();
Dzenan
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user