ICEfaces
  1. ICEfaces
  2. ICE-6363

Enabling compressDOM throws ClassCastException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces, compressDOM=true

      Description

      If compressDOM is enabled, the following Exception is thrown:

      Dec 10, 2010 9:44:30 AM org.icefaces.impl.context.DOMResponseWriter getOldDocument
      SEVERE: Failed to restore old DOM
      java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DocumentImpl cannot be cast to [B
      at org.icefaces.impl.context.DOMResponseWriter.getOldDocument(DOMResponseWriter.java:459)
      at org.icefaces.impl.context.DOMResponseWriter.getOldDocument(DOMResponseWriter.java:446)
      at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:157)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:968)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23442 Fri Dec 10 10:07:17 MST 2010 ted.goddard storing data rather than document for compressDOM (ICE-6363)
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
          Ted Goddard created issue -
          Ted Goddard made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 2.0.0 [ 10230 ]
          Assignee Ted Goddard [ ted.goddard ]
          Ted Goddard made changes -
          Link This issue blocks ICE-5756 [ ICE-5756 ]
          Hide
          Ted Goddard added a comment -

          Bug was introduced when switching from DOM storage in window scope to propagated ViewScope.

          +++ src/main/java/org/icefaces/impl/context/DOMResponseWriter.java (working copy)
          @@ -439,7 +439,7 @@
          serializer.setOutputStream(out);
          serializer.serialize(document);
          data = out.toByteArray();

          • facesContext.getViewRoot().getViewMap().put(OLD_DOM, document);
            + facesContext.getViewRoot().getViewMap().put(OLD_DOM, data);
            }
          Show
          Ted Goddard added a comment - Bug was introduced when switching from DOM storage in window scope to propagated ViewScope. +++ src/main/java/org/icefaces/impl/context/DOMResponseWriter.java (working copy) @@ -439,7 +439,7 @@ serializer.setOutputStream(out); serializer.serialize(document); data = out.toByteArray(); facesContext.getViewRoot().getViewMap().put(OLD_DOM, document); + facesContext.getViewRoot().getViewMap().put(OLD_DOM, data); }
          Ted Goddard made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ted Goddard
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: