Setting 'richfaces.queue.enabled' to 'false' force java.lang.IllegalStateException -----------------------------------------------------------------------------------
Key: RF-8941 URL: https://jira.jboss.org/browse/RF-8941 Project: RichFaces Issue Type: Bug Security Level: Public (Everyone can see) Affects Versions: 4.0.0.Milestone1 Reporter: Anton Belevich Assignee: Nick Belaevski Priority: Critical steps to reproduce: add to the web.xml in richfaces-showcase application <context-param> <param-name>org.richfaces.queue.enabled</param-name> <param-value>false</param-value> <!-- this is default value --> </context-param> try to use a4j:queue sample exception log: 15.07.2010 19:53:06 com.sun.faces.util.Util checkIdUniqueness SEVERE: JSF1007: Duplicate component ID j_idt26:j_id11 found in view. 15.07.2010 19:53:06 com.sun.faces.util.Util checkIdUniqueness SEVERE: +id: j_id1 type: javax.faces.component.uiviewr...@10cec16 +id: javax_faces_location_HEAD type: com.sun.faces.component.componentresourcecontai...@85e57 +id: j_id7 type: javax.faces.component.uiout...@169a1c5 +id: j_id8 type: javax.faces.component.uiout...@1fb9fb3 +id: j_id9 type: javax.faces.component.uiout...@b1be82 +id: j_id10 type: javax.faces.component.uiout...@15264db +id: j_idt9 type: javax.faces.component.uiout...@17aaa0e +id: j_id12 type: javax.faces.component.uiout...@5b8e8c +id: j_id13 type: javax.faces.component.uiout...@eb9f0d +id: j_id14 type: javax.faces.component.uiout...@1174031 +id: j_idt80 type: javax.faces.component.uiout...@1c313da +id: j_idt42 type: javax.faces.component.uiout...@1e3c2c6 +id: j_id2 type: javax.faces.component.uipa...@17757ad +id: j_idt1 type: javax.faces.component.uiviewparame...@f6852d +id: j_idt2 type: javax.faces.component.uiviewparame...@a16157 +id: j_idt3 type: javax.faces.component.uiviewparame...@fd981a +id: j_idt4 type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +id: j_idt5 type: <html xmlns="http://www.w3.org/1999/xhtml"> +id: j_idt6 type: javax.faces.component.uiout...@15fc606 +id: j_idt7 type: <title>Components Gallery</title> +id: j_idt8 type: javax.faces.component.uiout...@c1e4d5 +id: j_idt10 type: <table border="0" cellpadding="0" cellspacing="0" class="rich-page header_bg #{cc.attrs.pageClass}"> <tbody> <tr> <td> <div class="header_content rich-page-header #{cc.attrs.headerClass}"> <h1>Welcome to RichFaces demo!</h1> </div> </td> <td align="right" class="header_links_container"> +id: j_idt11 type: javax.faces.component.html.htmloutputl...@1959352 +id: j_idt12 type: Project Site +id: j_idt13 type: javax.faces.component.html.htmloutputt...@fb1135 +id: j_idt14 type: javax.faces.component.html.htmloutputl...@126c5a5 +id: j_idt15 type: Project Wiki +id: j_idt16 type: javax.faces.component.html.htmloutputt...@79df82 +id: j_idt17 type: javax.faces.component.html.htmloutputl...@1410a85 +id: j_idt18 type: RichFaces Community Space +id: j_idt19 type: javax.faces.component.html.htmloutputt...@119b1ca +id: j_idt20 type: javax.faces.component.html.htmloutputl...@1e779a7 +id: j_idt21 type: Download +id: j_idt22 type: javax.faces.component.html.htmloutputt...@1e3e7d2 +id: j_idt23 type: javax.faces.component.html.htmloutputl...@1a81bd5 +id: j_idt24 type: Sources +id: j_idt25 type: </td> </tr> <tr> <td width="100%" height="100%" class="bg_tabbody" colspan="2"> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" class="rich-page-content"> <tbody> <tr> <td class="menu_col rich-page-sidebar"> <div class="menu_width spacer"/> +id: j_idt26 type: javax.faces.component.uinamingcontai...@1bb60ad +id: j_id11 type: javax.faces.component.uipa...@1d590d +id: j_idt27 type: javax.faces.component.html.htmloutputt...@c80e21 +id: j_id11 type: javax.faces.component.uipa...@c18e99 +id: j_idt43 type: <div class="rich-panel #{cc.attrs.styleClass}" id="#{cc.attrs.id}" style="#{cc.attrs.style}" onclick="#{cc.attrs.onclick}" ondblclick="#{cc.attrs.ondblclick}" onkeydown="#{cc.attrs.onkeydown}" onkeypress="#{cc.attrs.onkeypress}" onkeyup="#{cc.attrs.onkeyup}" onmousedown="#{cc.attrs.onmousedown}" onmousemove="#{cc.attrs.onmousemove}" onmouseout="#{cc.attrs.onmouseout}" onmouseover="#{cc.attrs.onmouseover}" onmouseup="#{cc.attrs.onmouseup}"> +id: j_idt44 type: javax.faces.component.html.htmlpanelgr...@5ba50e +id: j_idt45 type: <div class="rich-panel-header #{cc.attrs.headerClass}"> +id: j_idt46 type: javax.faces.component.uiout...@b173c3 +id: j_idt47 type: </div> +id: j_idt48 type: <div class="rich-panel-body #{cc.attrs.bodyClass}"> +id: j_idt49 type: </div> </div> +id: j_idt28 type: <ul> +id: j_idt29 type: org.richfaces.component.uirep...@328c40 +id: j_idt30 type: <li> +id: j_idt31 type: javax.faces.component.html.htmloutputt...@95ef17 +id: j_idt32 type: javax.faces.component.html.htmloutputt...@183da96 +id: j_idt33 type: </li> <ul> +id: j_idt34 type: org.richfaces.component.uirep...@183d59c +id: j_idt35 type: <li> +id: j_idt36 type: javax.faces.component.html.htmloutcometargetl...@3cfaab +id: j_idt37 type: javax.faces.component.uiparame...@16d3046 +id: j_idt38 type: javax.faces.component.html.htmloutputt...@17c4779 +id: j_idt39 type: </li> +id: j_idt40 type: </ul> +id: j_idt41 type: </ul> +id: j_idt50 type: </td> <td class="content_col rich-page-body"> +id: j_idt51 type: javax.faces.component.uinamingcontai...@270fc4 +id: j_id8 type: javax.faces.component.uipa...@178e13f +id: j_idt43 type: <div class="rich-panel #{cc.attrs.styleClass}" id="#{cc.attrs.id}" style="#{cc.attrs.style}" onclick="#{cc.attrs.onclick}" ondblclick="#{cc.attrs.ondblclick}" onkeydown="#{cc.attrs.onkeydown}" onkeypress="#{cc.attrs.onkeypress}" onkeyup="#{cc.attrs.onkeyup}" onmousedown="#{cc.attrs.onmousedown}" onmousemove="#{cc.attrs.onmousemove}" onmouseout="#{cc.attrs.onmouseout}" onmouseover="#{cc.attrs.onmouseover}" onmouseup="#{cc.attrs.onmouseup}"> +id: j_idt44 type: javax.faces.component.html.htmlpanelgr...@187e184 +id: j_idt45 type: <div class="rich-panel-header #{cc.attrs.headerClass}"> +id: j_idt46 type: javax.faces.component.uiout...@1e6cf07 +id: j_idt47 type: </div> +id: j_idt48 type: <div class="rich-panel-body #{cc.attrs.bodyClass}"> +id: j_idt49 type: </div> </div> +id: j_idt52 type: org.richfaces.component.uirep...@1a37fac +id: j_idt53 type: javax.faces.component.html.htmloutcometargetl...@1132e76 +id: j_idt54 type: javax.faces.component.uiparame...@4f71a3 +id: j_idt55 type: javax.faces.component.html.htmloutputt...@1ad9b0f +id: j_idt56 type: javax.faces.component.uinamingcontai...@2209db +id: j_id8 type: javax.faces.component.uipa...@10c0fa7 +id: j_idt43 type: <div class="rich-panel #{cc.attrs.styleClass}" id="#{cc.attrs.id}" style="#{cc.attrs.style}" onclick="#{cc.attrs.onclick}" ondblclick="#{cc.attrs.ondblclick}" onkeydown="#{cc.attrs.onkeydown}" onkeypress="#{cc.attrs.onkeypress}" onkeyup="#{cc.attrs.onkeyup}" onmousedown="#{cc.attrs.onmousedown}" onmousemove="#{cc.attrs.onmousemove}" onmouseout="#{cc.attrs.onmouseout}" onmouseover="#{cc.attrs.onmouseover}" onmouseup="#{cc.attrs.onmouseup}"> +id: j_idt44 type: javax.faces.component.html.htmlpanelgr...@19ae493 +id: j_idt45 type: <div class="rich-panel-header #{cc.attrs.headerClass}"> +id: j_idt46 type: javax.faces.component.uiout...@14a616 +id: j_idt47 type: </div> +id: j_idt48 type: <div class="rich-panel-body #{cc.attrs.bodyClass}"> +id: j_idt49 type: </div> </div> +id: j_idt57 type: com.sun.faces.facelets.component.uirep...@b101cf +id: j_idt58 type: javax.faces.component.html.htmloutcometargetl...@edf4c8 +id: j_idt59 type: javax.faces.component.uiparame...@5b55a9 +id: j_idt60 type: javax.faces.component.html.htmloutputt...@54f169 +id: j_idt61 type: <fieldset><legend><b>#{demoNavigator.currentSample.name}</b></legend> +id: j_idt69 type: <p>JSF 2 provides queue mechanism out-of the box already. And RichFaces queue just provides some additional customizations to improve the queue usability and allow to tune your performance while using Ajax as much as possible.</p> <p>The only big difference which the developers who used queue in 3.3.x should remember: as JSF 2 already provides single queue and not allows to have more than one queue instance(currently) you can't really fire concurrent requests anymore. So the queue in RF now not actually defines logical queue but just a component for defining queueing options. </p> <p>Here you could explore additional optimization parameters of the queue and learn how they influence Ajax requests. This example is a good start to learn about Ajax requests flood protection.</p> <p>Pay attention to next point in the example:</p> <ul> <li>Setting request delay to greater value reduces the greatly requests count on fast typing. (More similar requests are combined in the result)</li> </ul> Also pay your attention to the queue definition. Such definition (inside some form without a name) means that the queue options becomes global for the form. +id: j_idt70 type: javax.faces.component.uinamingcontai...@1a3f178 +id: j_id7 type: javax.faces.component.uipa...@d7a9c9 +id: j_idt43 type: <div class="rich-panel #{cc.attrs.styleClass}" id="#{cc.attrs.id}" style="#{cc.attrs.style}" onclick="#{cc.attrs.onclick}" ondblclick="#{cc.attrs.ondblclick}" onkeydown="#{cc.attrs.onkeydown}" onkeypress="#{cc.attrs.onkeypress}" onkeyup="#{cc.attrs.onkeyup}" onmousedown="#{cc.attrs.onmousedown}" onmousemove="#{cc.attrs.onmousemove}" onmouseout="#{cc.attrs.onmouseout}" onmouseover="#{cc.attrs.onmouseover}" onmouseup="#{cc.attrs.onmouseup}"> +id: j_idt44 type: javax.faces.component.html.htmlpanelgr...@17892d5 +id: j_idt45 type: <div class="rich-panel-header #{cc.attrs.headerClass}"> +id: j_idt46 type: javax.faces.component.uiout...@eff545 +id: j_idt47 type: </div> +id: j_idt48 type: <div class="rich-panel-body #{cc.attrs.bodyClass}"> +id: j_idt49 type: </div> </div> +id: form type: javax.faces.component.html.htmlf...@7a3a30 +id: j_idt71 type: org.richfaces.component.uiqu...@825cf3 +id: j_idt72 type: javax.faces.component.html.htmlpanelg...@a47cc3 +id: j_idt73 type: javax.faces.component.html.htmlpanelg...@fae78f +id: j_idt74 type: javax.faces.component.html.htmloutputt...@789d63 +id: myinput type: javax.faces.component.html.htmlinputt...@a4ed99 +id: j_idt75 type: javax.faces.component.html.htmloutputt...@1eae15f +id: outtext type: javax.faces.component.html.htmloutputt...@172290f +id: j_idt76 type: javax.faces.component.html.htmloutputt...@1e5a5dc +id: events type: javax.faces.component.html.htmloutputt...@1ec41c0 +id: j_idt77 type: javax.faces.component.html.htmloutputt...@1d0e2c9 +id: requests type: javax.faces.component.html.htmloutputt...@d8fd1a +id: j_idt78 type: javax.faces.component.html.htmloutputt...@1d0e17a +id: updates type: javax.faces.component.html.htmloutputt...@834af6 +id: j_idt79 type: javax.faces.component.uinamingcontai...@1ae81ab +id: null type: javax.faces.component.uipa...@cbffde +id: j_idt81 type: org.richfaces.component.uioutputpa...@4c585f +id: j_idt82 type: javax.faces.component.html.htmlmess...@3de2df +id: j_idt83 type: javax.faces.component.html.htmlpanelg...@f9d4f7 +id: j_idt85 type: javax.faces.component.html.htmlcommandbut...@12efcfe +id: j_idt84 type: javax.faces.component.html.htmloutputt...@ca6ae +id: delay type: javax.faces.component.html.htmlinputt...@930120 +id: j_idt86 type: <script type="text/javascript"> var events = 0; var updates = 0; var outEvents = #{rich:element('events')}; var outUpdates = #{rich:element('updates')}; var outRequests = #{rich:element('requests')}; var requests=0; function addEvent(){ events++; } function addUpdate(){ updates++; } function addRequest(){ requests++; } function printCounts(){ outEvents.innerHTML=events; outUpdates.innerHTML=updates; outRequests.innerHTML=requests; } </script> <p>Queue could be defined as</p> <ul><li><b>Default for view.</b> In this case - the parameters will be used for all the Ajax requests in view(if not redefined). In order to define such queue - just place <b>a4j:queu</b> outside of any forms without defining <b>name</b></li> <li><b>Default for form.</b> Similar to view-scoped but should be defiend in some form without defining <b>name</b></li> <li><b>Referenced from ajax behaviors/components.</b> Queue should be defined with name and referenced using attachQueue tag(see corresponding sample).</li></ul> +id: j_idt66 type: </fieldset> +id: j_idt67 type: </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="footer_bg" colspan="2"> <div class="footer_bg_content rich-page-footer"> #{a4j} </div> </td> </tr> </tbody> </table> +id: j_idt68 type: </html> 15.07.2010 19:53:06 com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException SEVERE: Error Rendering View[/richfaces/component-sample.xhtml] java.lang.IllegalStateException: Component ID j_idt26:j_id11 has already been found in the view. at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:134) at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:126) at javax.faces.application.StateManager.getViewState(StateManager.java:529) at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:390) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:285) at org.richfaces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:189) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:378) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) java.lang.IllegalStateException: Component ID j_idt26:j_id11 has already been found in the view. at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:134) at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:126) at javax.faces.application.StateManager.getViewState(StateManager.java:529) at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:390) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:285) at org.richfaces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:189) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:378) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) 15.07.2010 19:53:06 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Faces Servlet threw exception java.lang.IllegalStateException: CDATA tags may not nest at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:626) at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172) at javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:334) at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:196) at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:119) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:115) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ richfaces-issues mailing list richfaces-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/richfaces-issues