Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces 2.1.0 BETA 10072011
Description
-
Hide
- Case10588Example.zip
- 18 kB
- Arran Mccullough
-
- Case10588Example/build.xml 3 kB
- Case10588Example/.../ant-deploy.xml 2 kB
- Case10588Example/.../build-impl.xml 58 kB
- Case10588Example/.../genfiles.properties 0.5 kB
- Case10588Example/.../private.properties 0.5 kB
- Case10588Example/.../project.properties 3 kB
- Case10588Example/nbproject/project.xml 0.9 kB
- Case10588Example/src/conf/MANIFEST.MF 0.0 kB
- Case10588Example/src/.../example/Item.java 1 kB
- Case10588Example/src/.../TestBean.java 0.7 kB
- Case10588Example/web/.../context.xml 0.1 kB
- Case10588Example/web/WEB-INF/web.xml 2 kB
- Case10588Example/.../welcomeICEfaces.xhtml 4 kB
-
Hide
- Case10588Example.war
- 7.39 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/com/.../example/Item.class 2 kB
- WEB-INF/classes/.../example/TestBean.class 1 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-ace.jar 1.42 MB
- WEB-INF/lib/icefaces-compat.jar 2.29 MB
- WEB-INF/lib/icefaces.jar 237 kB
- WEB-INF/lib/javax.faces.jar 2.48 MB
- WEB-INF/web.xml 2 kB
- welcomeICEfaces.xhtml 4 kB
Issue Links
- depends on
-
ICE-7348 ACE generator stores null values that JSF state saving can not handle
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
The sorting was working on the Oct 2nd release. One of the fixes since then seemed to have broken this.
In Firebug, we can see the sorting causes a POST, and this is the response. Evidently, JSF has encountered an error, and then has had an error while trying to report the first one.
<html><head><title>Apache Tomcat/7.0.20 - Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name
{color : black;}HR
{color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.IllegalStateException: CDATA tags may not nest
com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:630)
javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:342)
org.icefaces.ace.context.CallbackPartialResponseWriter.startError(CallbackPartialResponseWriter.java:120)
com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:200)
com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123)
org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:109)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.20 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.20</h3></body></html>
From the server log we can see that ColumnBase is trying to state save a Map, which has a null value in it, that's causing the exception. Since column has no Map properties, and the stack trace isn't showing much saveState recursion, it's likely that it's the StateHelper's own Map that has the null entry.
java.lang.NullPointerException
at javax.faces.component.StateHolderSaver.<init>(StateHolderSaver.java:96)
at javax.faces.component.UIComponentBase.saveAttachedState(UIComponentBase.java:1695)
at javax.faces.component.ComponentStateHelper.saveMap(ComponentStateHelper.java:378)
at javax.faces.component.ComponentStateHelper.saveState(ComponentStateHelper.java:256)
at javax.faces.component.UIComponentBase.saveState(UIComponentBase.java:1501)
at org.icefaces.ace.component.column.ColumnBase.saveState(ColumnBase.java:1324)
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:168)
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
at org.icefaces.ace.component.datatable.DataTable.visitColumnsAndColumnFacets(DataTable.java:502)
at org.icefaces.ace.component.datatable.DataTable.visitTree(DataTable.java:466)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at javax.faces.component.UIForm.visitTree(UIForm.java:344)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:160)
at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:133)
at javax.faces.application.StateManager.getViewState(StateManager.java:553)
at org.icefaces.impl.context.DOMPartialViewContext.renderState(DOMPartialViewContext.java:448)
at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:205)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:390)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
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:594)
Once the generated setter methods are fixed, the state saving exception will go away, and we can further examine the dataTable component to fix the issue.
This turned out to be unrelated, but all the app bean classes needed to be made Serializable, since I was also getting this error in the log:
WARNING: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession (key: testBean, value class: com.icefaces.support.example.TestBean).
There was an omission in some of the DataTable sorting code to handle the header columnGroup scenario. The renderer was changed because I added debug to diagnose the situation, that I subsequently removed, but in the mean while, made the code follow our coding standards. The DOMPartialViewContext change was to augment some of the logging there.
Internal development repository
Subversion 25916
ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
ace/component/src/org/icefaces/ace/component/datatable/DataTableRenderer.java
core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
Tested with bundle today in Williams application, multi column sorting is not working properly , for instance sort one column, go to ctrl-click a second column and it toggles the first column order, doesn't seem to sort the second column order as specified (the opposite order).
I suggest sorting be added to the poc and tested there.
I wouldn't have thought this would work in the first place. Sorting + grouped headers was a incompatibility captured in
ICE-7028.