[Echo-list] Problem with component.validation()
Brought to you by:
tliebeck
From: Georg S. <geo...@we...> - 2004-02-04 17:08:41
|
Hallo, I found a bug in conjunction with validate() and page reloading. If you have a validate() method that removes and added components and maybe you have a lot of components in the window doing so :) and maybe then you press the reload button of your browser very often you got the following error: 2004-02-04 17:46:25 test: EchoServer Error Log Reference #1003_1075913185142 nextapp.echoservlet.EchoServletException: Peer requested for unregistered component: nextapp.echo.Grid$Cell@ba9b15 at nextapp.echoservlet.InstancePeer.getPeer(InstancePeer.java:608) at nextapp.echoservlet.ui.GridUI.render(GridUI.java:158) at nextapp.echoservlet.ContentPaneUI.service(ContentPaneUI.java:283) at nextapp.echoservlet.Connection.process(Connection.java:443) at nextapp.echoservlet.EchoServer.process(EchoServer.java:304) at nextapp.echoservlet.EchoServer.doGet(EchoServer.java:214) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) .... org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536) 2004-02-04 17:46:25 test: Error while attempting to invalidate session as a result of previous error. nextapp.echoservlet.EchoServletException: Peer requested for unregistered component: nextapp.echo.Label@18e1674 at nextapp.echoservlet.InstancePeer.getPeer(InstancePeer.java:608) at nextapp.echoservlet.InstancePeer.unregister(InstancePeer.java:1084) at nextapp.echoservlet.InstancePeer.remove(InstancePeer.java:993) at ... In the attachment there is a TestServlet which simulates this situation. When running you see that two threads modify the same datastructure and the error occurs when thread one has removed all instancePeers while thread two tries to render everything. To show this I have added also some code to Connection.java (line 467) Georg |