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

          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); }

            People

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

              Dates

              • Created:
                Updated:
                Resolved: