Description
I got error like this:
org.apache.wicket.request.RequestHandlerStack : Error detaching RequestHandler java.lang.ClassCastException: id.co.bippo.product.impl.VariedProductImpl cannot be cast to java.util.List at org.soluvas.web.site.EmfListModel.onDetach(EmfListModel.java:60) ~[classes/:na] at org.apache.wicket.model.LoadableDetachableModel.detach(LoadableDetachableModel.java:99) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detachModel(Component.java:3585) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detachModels(Component.java:1242) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1172) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.MarkupContainer.detachChildren(MarkupContainer.java:1609) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.Component.detach(Component.java:1179) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.core.request.handler.PageProvider.detach(PageProvider.java:327) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.core.request.handler.RenderPageRequestHandler.detach(RenderPageRequestHandler.java:156) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.detach(RequestCycle.java:873) ~[wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerStack.java:180) ~[wicket-request-6.18.0.jar:6.18.0] at org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:636) [wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:589) [wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) [wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) [wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) [wicket-core-6.18.0.jar:6.18.0] at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) [wicket-core-6.18.0.jar:6.18.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-7.0.56.jar:7.0.56] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at org.soluvas.web.site.servlet.ShiroPrincipalsServletFilter.doFilter(ShiroPrincipalsServletFilter.java:59) [classes/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at org.soluvas.web.site.servlet.MoreMdcServletFilter.doFilter(MoreMdcServletFilter.java:62) [classes/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at ch.qos.logback.classic.helpers.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:51) [logback-classic-1.0.13.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.3.jar:1.2.3] at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.3.jar:1.2.3] at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.1.2.RELEASE.jar:4.1.2.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) [spring-web-4.1.2.RELEASE.jar:4.1.2.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:104) [metrics-servlet-3.1.0.jar:3.1.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.42] at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:123) [catalina.jar:7.0.42] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) [catalina.jar:7.0.42] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:7.0.42] at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:171) [catalina.jar:7.0.42] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java) [catalina.jar:7.0.42] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) [catalina.jar:7.0.42] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.42] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.42] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.42] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) [tomcat-coyote.jar:7.0.42] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) [tomcat-coyote.jar:7.0.42] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) [tomcat-coyote.jar:7.0.42] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_05] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_05] at java.lang.Thread.run(Thread.java:745) [na:na]
It's possible to debug this error and in this case there's nothing wrong in Wicket. However, Wicket can help making the debugging much easier by wrapping the Exception and mentioning the component's path, which will allow us to pointpoint the problematic model rather quickly.
In a page with tens or hundreds of (nested) components, without this info it will take some time.
I'm pretty sure you'll approve this request. Thank you Wicket Thank you mgrigorov
Tag ceefour