3 Replies Latest reply on Jun 15, 2011 3:33 AM by Robson Cholo

    NullPointerException at CompositeComponentTagHandler

    Robson Cholo Newbie

      Hi

      I've recently started to explore RF 4 capabilities and encountered a problem with a4j and composite at the same page.

       

      At first I've created simple page to test ajax and it worked like a charm:

       

              <h:form>

                  <h:inputText id="in" value="#{testBean.value}">

                      <a4j:ajax event="keyup" render="out" />

                  </h:inputText>

                  <h:outputText value="#{testBean.value}" id="out" />          

              </h:form>

       

      Then, I've added one, almost empty composite component and ajax ceased to work

       

              <comp:testComponent/>

       

              <h:form>

                  <h:inputText id="in" value="#{testBean.value}">

                      <a4j:ajax event="keyup" render="out" />

                  </h:inputText>

                  <h:outputText value="#{testBean.value}" id="out" />          

              </h:form>

       

       

      At the client side a4j:log prints:

      debug[14:34:03.091]: New request added to queue. Queue requestGroupingId changed to j_idt7:in

      debug[14:34:03.091]: Queue will wait 0ms before submit

      debug[14:34:03.091]: richfaces.queue: will submit request NOW

      info [14:34:03.091]: Received 'begin' event from <input id=j_idt7:in ...>

      info [14:34:03.200]: Received 'beforedomupdate' event from <input id=j_idt7:in ...>

      debug[14:34:03.200]: Server returned responseText: <?xml version='1.0' encoding='UTF-8'?> <partial-response><error><error-name>class java.lang.NullPointerException</error-name><error-message><![CDATA[]]></error-message></error></partial-response>

      info [14:34:03.200]: Element error
      <error><error-name>class java.lang.NullPointerException</error-name><error-message><![CDATA[]]></error-message></error>

      debug[14:34:03.200]: richfaces.queue: ajax submit error

      debug[14:34:03.200]: richfaces.queue: Nothing to submit

      error[14:34:03.200]: Received 'error@serverError' event from <input id=j_idt7:in ...>

      error[14:34:03.216]: [200] class java.lang.NullPointerException:

      info [14:34:03.216]: Received 'complete' event from <input id=j_idt7:in ...>

       

      and at the server exception is:

      java.lang.NullPointerException at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.createMetaRuleset(CompositeComponentTagHandler.java:250)

       

       

      I've tried with "4.0.0.Final" and "4.1.0-SNAPSHOT" versions of the maven bom.

       

      Have you got any ideas what's wrong ?

       

      Regards,

      robert