Re: [6.0] weird exception about super.onBeforeRender()
Hi, Put a breakpoint at org.apache.wicket.Component#internalBeforeRender, in the second 'if' clause that throws this exception. This way you can see details about the problematic component - like its type, its id, its parents, etc. This way you should be able to identify which parent class doesn't call super.onBeforeRender() On Sun, Jan 27, 2013 at 5:53 PM, Pierre Goupil goupilpie...@gmail.comwrote: Good afternoon, In my project I got this exception from times to times: Last cause: org.apache.wicket.Component has not been properly rendered. Something in the hierarchy of blah.ExternalImage has not called super.onBeforeRender() in the override of onBeforeRender() method WicketMessage: Error attaching this container for rendering: [WebMarkupContainer [Component id = wrapper]] This occurs during an Ajax update. What puzzles me is: - that it doesn't occur every time, only now and then - and that I never override onBeforeRender() in my code, neither in ExternalImage nor everywhere else. Here is my code for ExternalImage, just in case: public class ExternalImage extends WebComponent { private static final long serialVersionUID = 1L; public ExternalImage(final String id, final String imageUrl) { super(id); this.add(AttributeModifier.replace(src, new ModelString(imageUrl))); this.setVisible(!((imageUrl == null) || imageUrl.equals())); } @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); this.checkComponentTag(tag, img); } } Regarding my wrapper component ([Component id = wrapper] in the exception), it's pretty straightforward: final WebMarkupContainer wrapper = new WebMarkupContainer(wrapper); wrapper.setMarkupId(wrapper + item.getIndex()); wrapper.setOutputMarkupId(true); I've googled around without any success, so if anyone has an idea, I'd be more than happy! :-) Regards, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: a weird exception when update Panel
Hi, What is the type of component with id 'includeMain' ? The exception says that the second request cannot find a behavior to execute at position one in component 'includeMain'. To understand why this happens we need to know what happens in onXyz() callback in the first request/click. I think you can avoid this by disabling the link after click on the client side so the user cannot click second time until the first returns. On Tue, Dec 4, 2012 at 8:33 AM, JamesXWang jameswong@gmail.com wrote: Hi Folks, On one of my v6.1 wick page there is a set of tabs and a main panel. When user click on a new tab it will trigger an ajax behavior and create a different panel to update the main panel. Sometimes I've seen below exception if I click the tab quickly once the page is loaded. But it didn't happen everytime. Even it happened I refresh the page and wait for few second, then click the tabs again the page will work well without any exception. On the main panel java I've tried to override the getStatelessHint() to return false but it help nothing of this weird exception. Any one have the idea how to fix it? Many thanks in advance! Exception detail below - Unexpected RuntimeException Last cause: Cannot find behavior with id '1' on component 'com.myapp.web.common.LogsPanel:includeMainPanel:includeMain' in page '[Page class = com.myapp.web.home.HomePage, id = 6, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. Stacktrace Root cause: org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id '1' on component 'com.myapp.web.common.LogsPanel:includeMainPanel:includeMain' in page '[Page class = com.myapp.web.home.HomePage, id = 6, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. at org.apache.wicket.Behaviors.getBehaviorById(Behaviors.java:303) at org.apache.wicket.Component.getBehaviorById(Component.java:4479) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:246) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71
a weird exception when update Panel
Hi Folks, On one of my v6.1 wick page there is a set of tabs and a main panel. When user click on a new tab it will trigger an ajax behavior and create a different panel to update the main panel. Sometimes I've seen below exception if I click the tab quickly once the page is loaded. But it didn't happen everytime. Even it happened I refresh the page and wait for few second, then click the tabs again the page will work well without any exception. On the main panel java I've tried to override the getStatelessHint() to return false but it help nothing of this weird exception. Any one have the idea how to fix it? Many thanks in advance! Exception detail below - Unexpected RuntimeException Last cause: Cannot find behavior with id '1' on component 'com.myapp.web.common.LogsPanel:includeMainPanel:includeMain' in page '[Page class = com.myapp.web.home.HomePage, id = 6, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. Stacktrace Root cause: org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id '1' on component 'com.myapp.web.common.LogsPanel:includeMainPanel:includeMain' in page '[Page class = com.myapp.web.home.HomePage, id = 6, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. at org.apache.wicket.Behaviors.getBehaviorById(Behaviors.java:303) at org.apache.wicket.Component.getBehaviorById(Component.java:4479) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:246) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/a-weird-exception-when-update-Panel-tp4654448.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Weird exception
We've been getting the following exception intermittently during a performance test: Caused by: java.lang.ClassCastException: [B at org.apache.wicket.Session.pageMapForName(Session.java:928) at org.apache.wicket.PageMap.forName(PageMap.java:67) at org.apache.wicket.Page.init(Page.java:1167) at org.apache.wicket.Page.init(Page.java:236) at org.apache.wicket.markup.html.WebPage.init(WebPage.java:184) at ca.on.ssha.oneid.web.ui.BasePage.init(BasePage.java:52) at ca.on.ssha.oneid.web.ui.login.LoginPage.init(LoginPage.java:45) ... 29 more We are using Wicket 1.3.5. At Session.java:928 Wicket is trying to cast a session attribute to IPageMap but apparently the attribute value is a byte array. So far we've only seen it on the initial page for the session, such as the login page in the example above. Any ideas? jk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Weird exception
OC4J 10.1.3.3 Java 1.5.0_06 Red Hat Linux (not sure of the version) jk On Wed, Sep 02, 2009 at 07:31:31PM +0200, nino martinez wael wrote: What kind of container are you running it in? And java version etc..? 2009/9/2 John Krasnay j...@krasnay.ca: We've been getting the following exception intermittently during a performance test: Caused by: java.lang.ClassCastException: [B at org.apache.wicket.Session.pageMapForName(Session.java:928) at org.apache.wicket.PageMap.forName(PageMap.java:67) at org.apache.wicket.Page.init(Page.java:1167) at org.apache.wicket.Page.init(Page.java:236) at org.apache.wicket.markup.html.WebPage.init(WebPage.java:184) at ca.on.ssha.oneid.web.ui.BasePage.init(BasePage.java:52) at ca.on.ssha.oneid.web.ui.login.LoginPage.init(LoginPage.java:45) ... 29 more We are using Wicket 1.3.5. At Session.java:928 Wicket is trying to cast a session attribute to IPageMap but apparently the attribute value is a byte array. So far we've only seen it on the initial page for the session, such as the login page in the example above. Any ideas? jk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org