ICEfaces
  1. ICEfaces
  2. ICE-5640

<f:ajax tag with render for messages throwing exceptions and not supported correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      jsf2.0, ICEfaces 2.0

      Description

         <h1>Test Message Render</h1>
          <h2> Test with id</h2>
          <h:form id="testform1">
              <h:inputText id="in1" value="#{numberholder.number}"/>
              <br/>
              <h:commandButton id="button2" type="submit" value="Count"
                               action="/ajax/ajaxMessage">
                  <f:ajax execute="in1" render="in1 msgs"/>
                               </h:commandButton>
              <h:messages id="msgs"/>
          </h:form>

      this is a snippet from ajaxMessage.xhtml (part of AjaxMessageTestCase
      Note the f:ajax command which states where to print the facesmessages. This is not working properly. Other option is to print it in table form...
         <h:form id="testform3a">
              <h:inputText id="in1" value="#{numberholder.number}"/>
              <br/>
              <h:commandButton id="button2" type="submit" value="Count"
                               action="/ajax/ajaxMessage">
                  <f:ajax execute="in1" render="@form"/>
                               </h:commandButton>
              <h:messages layout="table"/>
          </h:form>

      Back from tcpdump is the following:-
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>GlassFish v3 - Error report</title><style type="text/css"><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></p><p><b>description</b>The server encountered an internal error () that prevented it from fulfilling this request.</p><p><b>exception</b> <pre>java.lang.NullPointerException</pre></p><p><b>note</b> <u>The full stack traces of the exception and its root causes are available in the GlassFish v3 logs.</u></p><hr/><h3>GlassFish v3</h3></body></html>
       
      and from server log:-

      [#|2010-04-19T14:44:41.280-0600|SEVERE|glassfishv3.0|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=24;_ThreadName=Thread-1;|Error Rendering View[/ajax/ajaxMessage.xhtml]
      java.lang.NullPointerException
      at org.icefaces.context.DOMResponseWriter.seekSubtree(DOMResponseWriter.java:474)
      at org.icefaces.context.DOMPartialRenderCallback.visit(DOMPartialViewContext.java:377)
      at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:175)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1442)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
      at javax.faces.component.UIForm.visitTree(UIForm.java:331)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
      at org.icefaces.context.DOMPartialViewContext.renderSubtrees(DOMPartialViewContext.java:228)
      at org.icefaces.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:164)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:985)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1609)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:378)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at com.sun.faces.scripting.GroovySupportFilter.doFilter(GroovySupportFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:329)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
      at java.lang.Thread.run(Thread.java:637)

        Issue Links

          Activity

          Judy Guglielmin created issue -
          Hide
          Judy Guglielmin added a comment -

          Many of the tests require faces messages to verify tests pass (especially validators and converters)

          Show
          Judy Guglielmin added a comment - Many of the tests require faces messages to verify tests pass (especially validators and converters)
          Judy Guglielmin made changes -
          Field Original Value New Value
          Link This issue blocks ICE-4950 [ ICE-4950 ]
          Hide
          Judy Guglielmin added a comment -

          request (from tcpdump):-
          testform1a=testform1a&javax.faces.ViewState=j_id27%3Aj_id28&testform1a%3Ain1=1&ice.window=jug87qfaaz&javax.faces.source=testform1a%3Abutton2&javax.faces.partial.event=click&javax.faces.partial.execute=testform1a%3Abutton2%20testform1a%3Ain1&javax.faces.partial.render=testform1a%3Ain1%20testform1a%3Amsgs&javax.faces.behavior.event=action&javax.faces.partial.ajax=true

          Show
          Judy Guglielmin added a comment - request (from tcpdump):- testform1a=testform1a&javax.faces.ViewState=j_id27%3Aj_id28&testform1a%3Ain1=1&ice.window=jug87qfaaz&javax.faces.source=testform1a%3Abutton2&javax.faces.partial.event=click&javax.faces.partial.execute=testform1a%3Abutton2%20testform1a%3Ain1&javax.faces.partial.render=testform1a%3Ain1%20testform1a%3Amsgs&javax.faces.behavior.event=action&javax.faces.partial.ajax=true
          Hide
          Judy Guglielmin added a comment -

          From server log note that the DOM is null and the id that is being searched for in the subtree is:- testform1:in1

          [#|2010-04-19T16:14:51.427-0600|WARNING|glassfishv3.0|org.icefaces.context.DOMPartialViewContext|_ThreadID=24;_ThreadName=Thread-1;|DOM is null during applyBrowserChanges|#]

          [#|2010-04-19T16:14:51.432-0600|INFO|glassfishv3.0|org.icefaces.context.DOMResponseWriter|_ThreadID=24;_ThreadName=Thread-1;|seekSubtree for id=testform1:in1|#]

          [#|2010-04-19T16:14:51.435-0600|SEVERE|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=24;_ThreadName=Thread-1;|java.lang.NullPointerException
          at org.icefaces.context.DOMResponseWriter.seekSubtree(DOMResponseWriter.java:475)

          Show
          Judy Guglielmin added a comment - From server log note that the DOM is null and the id that is being searched for in the subtree is:- testform1:in1 [#|2010-04-19T16:14:51.427-0600|WARNING|glassfishv3.0|org.icefaces.context.DOMPartialViewContext|_ThreadID=24;_ThreadName=Thread-1;|DOM is null during applyBrowserChanges|#] [#|2010-04-19T16:14:51.432-0600|INFO|glassfishv3.0|org.icefaces.context.DOMResponseWriter|_ThreadID=24;_ThreadName=Thread-1;|seekSubtree for id=testform1:in1|#] [#|2010-04-19T16:14:51.435-0600|SEVERE|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=24;_ThreadName=Thread-1;|java.lang.NullPointerException at org.icefaces.context.DOMResponseWriter.seekSubtree(DOMResponseWriter.java:475)
          Hide
          Judy Guglielmin added a comment -

          this is what tcpdump provides for the successful request and render (test without ICEfaces):-
          testform1=testform1&javax.faces.ViewState=j_id9%3Aj_id10&testform1%3Ain1=1&javax.faces.source=testform1%3Abutton2&javax.faces.partial.event=click&javax.faces.partial.execute=testform1%3Abutton2%20testform1%3Ain1&javax.faces.partial.render=testform1%3Ain1%20testform1%3Amsgs&javax.faces.behavior.event=action&javax.faces.partial.ajax=true
          14:06:32.719943 IP6 localhost.http-alt > localhost.55676: . ack 1033 win 65535 <nop,nop,timestamp 193439077 193439077>
          `..^. .@...................................|.....9.......4.....
          ...e...e
          14:06:32.736050 IP6 localhost.http-alt > localhost.55676: P 1:575(574) ack 1033 win 65535 <nop,nop,timestamp 193439078 193439077>
          `....@...................................|.....9.......Q.....
          ...f...eHTTP/1.1 200 OK
          X-Powered-By: Servlet/3.0
          Server: GlassFish v3
          X-Powered-By: JSF/2.0
          Cache-Control: no-cache
          Content-Type: text/xml;charset=UTF-8
          Content-Length: 362
          Date: Mon, 19 Apr 2010 20:06:32 GMT

          <?xml version='1.0' encoding='UTF-8'?>
          <partial-response><changes><update id="testform1:in1"><Unable to render embedded object: File (in1" type="text" name="testform1:in1" value="1" />]]></update><update id="testform1:msgs"><) not found.[CDATA[<div id="testform1:msgs"></div>]]></update><update id="javax.faces.ViewState"><![CDATA[j_id9:j_id10]]></update></changes></partial-response>
          14:06:32.736096 IP6 localhost.55676 > localhost.http-alt: . ack 575 win 65535 <nop,nop,timestamp 193439078 193439078>

          Show
          Judy Guglielmin added a comment - this is what tcpdump provides for the successful request and render (test without ICEfaces):- testform1=testform1&javax.faces.ViewState=j_id9%3Aj_id10&testform1%3Ain1=1&javax.faces.source=testform1%3Abutton2&javax.faces.partial.event=click&javax.faces.partial.execute=testform1%3Abutton2%20testform1%3Ain1&javax.faces.partial.render=testform1%3Ain1%20testform1%3Amsgs&javax.faces.behavior.event=action&javax.faces.partial.ajax=true 14:06:32.719943 IP6 localhost.http-alt > localhost.55676: . ack 1033 win 65535 <nop,nop,timestamp 193439077 193439077> `..^. .@...................................|.....9.......4..... ...e...e 14:06:32.736050 IP6 localhost.http-alt > localhost.55676: P 1:575(574) ack 1033 win 65535 <nop,nop,timestamp 193439078 193439077> `.. . .@...................................|.....9.......Q..... ...f...eHTTP/1.1 200 OK X-Powered-By: Servlet/3.0 Server: GlassFish v3 X-Powered-By: JSF/2.0 Cache-Control: no-cache Content-Type: text/xml;charset=UTF-8 Content-Length: 362 Date: Mon, 19 Apr 2010 20:06:32 GMT <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="testform1:in1">< Unable to render embedded object: File (in1" type="text" name="testform1:in1" value="1" />]]></update><update id="testform1:msgs"><) not found. [CDATA [<div id="testform1:msgs"></div>] ]></update><update id="javax.faces.ViewState"><![CDATA [j_id9:j_id10] ]></update></changes></partial-response> 14:06:32.736096 IP6 localhost.55676 > localhost.http-alt: . ack 575 win 65535 <nop,nop,timestamp 193439078 193439078>
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0-Alpha3 [ 10032 ]
          Assignee Judy Guglielmin [ judy.guglielmin ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21297 Fri Apr 23 08:30:44 MDT 2010 deryk.sinotte ICE-5640: allow sub tree rendering after post-back navigation
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/context/DOMResponseWriter.java
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/context/DOMPartialViewContext.java
          Ken Fyten made changes -
          Link This issue depends on ICE-4950 [ ICE-4950 ]
          Deryk Sinotte made changes -
          Link This issue depends on ICE-5716 [ ICE-5716 ]
          Hide
          Judy Guglielmin added a comment -

          Although the AjaxMessageTestCase.testCommandbuttonButton() does not pass :-

          Testcase: testCommandButtonButton took 1.988 sec
          [junit] Caused an ERROR
          [junit] com.gargoylesoftware.htmlunit.html.HtmlDivision
          [junit] java.lang.ClassCastException: com.gargoylesoftware.htmlunit.html.HtmlDivision
          [junit] at com.sun.faces.ajax.AjaxMessageTestCase.testCommandButtonButton(AjaxMessageTestCase.java:155)
          [junit] Test com.sun.faces.ajax.AjaxMessageTestCase FAILED

          when using the url in the browser
          http://localhost:8080/jsf-systest/faces/ajax/ajaxMessage.xhtml
          testing that a non-integer in any of the input fields does produce the correct facesMessage. (didn't do this before).
          Each input field is on a separate form and no affecting any of the other inputfields/forms-again the correct behaviour.
          Tested with glimmer rev. 21461

          Show
          Judy Guglielmin added a comment - Although the AjaxMessageTestCase.testCommandbuttonButton() does not pass :- Testcase: testCommandButtonButton took 1.988 sec [junit] Caused an ERROR [junit] com.gargoylesoftware.htmlunit.html.HtmlDivision [junit] java.lang.ClassCastException: com.gargoylesoftware.htmlunit.html.HtmlDivision [junit] at com.sun.faces.ajax.AjaxMessageTestCase.testCommandButtonButton(AjaxMessageTestCase.java:155) [junit] Test com.sun.faces.ajax.AjaxMessageTestCase FAILED when using the url in the browser http://localhost:8080/jsf-systest/faces/ajax/ajaxMessage.xhtml testing that a non-integer in any of the input fields does produce the correct facesMessage. (didn't do this before). Each input field is on a separate form and no affecting any of the other inputfields/forms-again the correct behaviour. Tested with glimmer rev. 21461
          Judy Guglielmin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Security Private [ 10001 ]
          Ken Fyten made changes -
          Fix Version/s 2.0.0 [ 10230 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Judy Guglielmin
              Reporter:
              Judy Guglielmin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: