Error while removing a node out of a tree
pschuett Apr 21, 2011 10:32 AMHallo,
I get the appending exception when I remove a tree node out of the tree.
I call via commandLink a delete-method in my controller bean which removes a node out of the tree model.
When I refresh the browser I see the delete-Action was successful.
The tree has this structure:
<rich:tree id="processPackageTree" toggleType="ajax" ajaxSubmitSelection="true" var="item">
<rich:treeModelAdaptor nodes="#{allProcessDefsBean.allReleaseContainerDefList}" toggleType="client" >
<rich:treeNode iconLeaf="#{item.used ? '/web/img/package_used.png' : '/images/process/package.png'}"
iconExpanded="#{item.used ? '/web/img/package_used.png' : '/images/process/package.png'}"
iconCollapsed="#{item.used ? '/web/img/package_used.png' : '/images/process/package.png'}">
<h:outputText value="#{item.name}" />
</rich:treeNode>
<rich:treeModelAdaptor id="releaseDef" nodes="#{item.releaseDefs}">
<rich:treeNode iconLeaf="#{item.used ? '/web/img/release_used.png' : '/images/process/release.png'}"
iconExpanded="#{item.used ? '/web/img/release_used.png' : '/images/process/release.png'}"
iconCollapsed="#{item.used ? '/web/img/release_used.png' : '/images/process/release.png'}">
<a4j:commandLink action="#{allProcessDefsBean.releaseNodeClick}" render="processReleaseInfoPanel, processButtonPanel" immediate="true">
<a4j:param name="packageDefId" value="#{item.owner.id}" assignTo="#{allProcessDefsBean.currentReleaseContainerDefId}"/>
<a4j:param name="releaseDefId" value="#{item.id}" assignTo="#{allProcessDefsBean.currentReleaseDefId}"/>
<h:outputText value="#{item.fromDate}">
<f:convertDateTime type="date" dateStyle="medium" timeZone="#{allProcessDefsBean.timeZone}"/>
</h:outputText>
</a4j:commandLink>
</rich:treeNode>
<rich:treeModelAdaptor id="subNode" nodes="#{item.nodes}">
<rich:treeNode >
<a4j:commandLink action="#{allProcessDefsBean.subNodeClick}" render="processReleaseInfoPanel, processButtonPanel" immediate="true">
<h:outputText value="#{item.name}" />
</a4j:commandLink>
</rich:treeNode>
...
The delete-method:
<a4j:commandLink id="processPackageDefReleaseDelete" action="#{allProcessDefsBean.deleteRelease}"
render="processPackageTree,processReleaseInfoPanel,messages,processButtonPanel" rendered="#{allProcessDefsBean.currentReleaseDef != null}">
<h:outputFormat value="#{dr.defs_all_delete_release_definition}" >
<f:param value="#{allProcessDefsBean.currentReleaseContainerDef.name}"/>
<f:param value="#{allProcessDefsBean.currentReleaseDef.fromDate}"/>
</h:outputFormat>
</a4j:commandLink>
This exceptions was written to the log file:
21.04.2011 14:25:42 org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback logException
SCHWERWIEGEND: Index: 1, Size: 1
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.google.common.collect.Iterables.get(Iterables.java:634)
at org.richfaces.component.DeclarativeTreeDataModelWalker.setupDataModelContext(DeclarativeTreeDataModelWalker.java:86)
at org.richfaces.component.DeclarativeTreeDataModelWalker.walk(DeclarativeTreeDataModelWalker.java:123)
at org.richfaces.model.DeclarativeTreeDataModelImpl.setupKey(DeclarativeTreeDataModelImpl.java:105)
at org.richfaces.model.TreeSequenceKeyModel.setRowKey(TreeSequenceKeyModel.java:49)
at org.richfaces.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:277)
at org.richfaces.renderkit.TreeRendererBase.encodeSelectionStateInput(TreeRendererBase.java:131)
at org.richfaces.renderkit.html.TreeRenderer.encodeEnd(TreeRenderer.java:145)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:883)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:853)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:278)
at org.richfaces.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:58)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:853)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:278)
at org.richfaces.renderkit.html.TogglePanelItemRenderer.doEncodeChildren(TogglePanelItemRenderer.java:132)
at org.richfaces.renderkit.html.TabRenderer.doEncodeChildren(TabRenderer.java:110)
at org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:157)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:853)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
at org.richfaces.renderkit.html.TogglePanelRenderer.encodeMetaComponent(TogglePanelRenderer.java:192)
at org.richfaces.component.AbstractTogglePanel.encodeMetaComponent(AbstractTogglePanel.java:699)
at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:503)
at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:337)
at org.richfaces.context.ExtendedVisitContext.invokeMetaComponentVisitCallback(ExtendedVisitContext.java:72)
at org.richfaces.component.AbstractTogglePanel.visitTree(AbstractTogglePanel.java:723)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at org.richfaces.component.AbstractTogglePanel.visitTree(AbstractTogglePanel.java:735)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIForm.visitTree(UIForm.java:335)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:284)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:206)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:974)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:388)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
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 com.timocom.process.web.settings.LocaleRequestFilter.doFilter(LocaleRequestFilter.java:67)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:127)
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:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
21.04.2011 14:25:42 com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SCHWERWIEGEND: Error Rendering View[/web/index.xhtml]
java.lang.IllegalStateException: CDATA tags may not nest
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:630)
at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
at javax.faces.context.PartialResponseWriter.startUpdate(PartialResponseWriter.java:205)
at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:511)
at org.richfaces.context.RenderExtendedVisitContext.invokeVisitCallbackForImplicitComponent(RenderExtendedVisitContext.java:71)
at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:349)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1485)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIForm.visitTree(UIForm.java:335)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:284)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:206)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:974)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:388)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
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 com.timocom.process.web.settings.LocaleRequestFilter.doFilter(LocaleRequestFilter.java:67)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:127)
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:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Thanks for any hints.
Ciao
Peter Schütt