ICEfaces
  1. ICEfaces
  2. ICE-3575

ICE + SWF: INVALID_CHARACTER_ERR thrown by ICEfaces when rendering

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Spring Web Flow

      Description

      In my project we have been struggling with a strange behavior of ICEfaces occuring when ICEfaces needs to rerender the same page, either when navigating to the same page or when redisplaying the page because of conversion errors. During the rerendering ICEfaces will walk through the view tree to render each node but for unknown reasons the UIXhtmlComponents found in our tree turn out to be misconfigured in the sence that their tag property contains a null value.

      On the first render each UIXhtmlComponent matches a tag on the page. For instance, In my test page I have a regular HTML paragraph tag so in the view tree there is a corresponding UIXhtmlComponent instance which has a tag property value of "p". We also have a head tag and a title tag in our pages and they are also represented by corresponding UIXhtmlComponents, "head" and "title". The problem is that on the rerendering of the page the tag information of each and every component is somehow lost - the getTag methods of all UIXhtmlComponents is gone; e.g. instead of the getTag method of the component representing a paragraph returning "p" it now returns null.

      When using the debugger I can see the complete view tree containing many different UIXhtmlComponents but each of their getTag methods return null. This makes the underlying Xerces implementation fail because it is subsequently asked to build an XHTML document containing a tag called null. This again leads to a DOMException with the (misleading) error INVALID_CHARACTER_ERR (see below).

      I have spent quite some time debugging this issue, and the more I look at it, the more it seems to me that this is a bug related to us using ICEfaces with Spring Web Flow. I have used ICEfaces in other projects without spring web flow, and I have never seen this problem before. From the strack trace below it also shows that web flow is taking part in this. I do not know if this bug will go away by itself once 1.7.2 comes out because of all the SWF integration fixes, but I feel I ought to inform you that this problem exists.

      Yours
      Randahl

      [23-09-08 08:25:16:088 CEST] 0000002e ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet Blocking Servlet. Exception thrown : org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'ice' of flow 'welcome'
      at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:568)
      at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:267)
      at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:153)
      at com.icesoft.faces.webapp.http.core.SwfLifecycleExecutor.apply(SwfLifecycleExecutor.java:42)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:54)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:42)
      at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
      at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
      at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
      at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3177)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:253)
      at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:229)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1970)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
      Caused by: javax.faces.FacesException: Problem in renderResponse: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
      at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:294)
      at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
      at org.springframework.faces.webflow.JsfView.render(JsfView.java:92)
      at org.springframework.webflow.engine.ViewState.render(ViewState.java:257)
      at org.springframework.webflow.engine.ViewState.resume(ViewState.java:216)
      at org.springframework.webflow.engine.Flow.resume(Flow.java:551)
      at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:263)
      ... 32 more
      Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
      at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source)
      at com.icesoft.faces.context.DOMResponseWriter.startElement(DOMResponseWriter.java:146)
      at com.icesoft.faces.renderkit.dom_html_basic.XMLRenderer.encodeBegin(XMLRenderer.java:51)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:725)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:547)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
      at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
      ... 38 more

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Randahl Isaksen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: