[ https://issues.apache.org/jira/browse/WICKET-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-2993. ------------------------------------- Fix Version/s: 1.5-M2 Resolution: Fixed Fixed with r985727. > ClassCastException when requesting for non-page class > ------------------------------------------------------ > > Key: WICKET-2993 > URL: https://issues.apache.org/jira/browse/WICKET-2993 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.5-M1 > Environment: Any > Reporter: Martin Grigorov > Assignee: Martin Grigorov > Fix For: 1.5-M2 > > > org.apache.wicket.request.mapper.BookmarkableMapper tries to instantiate Page > even for classes which are not Page. > Requesting http://localhost:8080/wicket/bookmarkable/com.mycompany.Pojo fails > with: > ERROR - DefaultExceptionMapper - Unexpected error occurred > java.lang.ClassCastException: com.mycompany.Pojo > at > org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:155) > at > org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:59) > at > org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:43) > at > org.apache.wicket.Application$2.newPageInstance(Application.java:1425) > at > org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:259) > at > org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:160) > at > org.apache.wicket.request.handler.render.WebPageRenderer.getPage(WebPageRenderer.java:59) > at > org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:131) > at > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:232) > at > org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:147) > at > org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84) > at > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:217) > at > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253) > at > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:135) > at > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:188) > at > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) > > ..... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.