3 Replies Latest reply on Jan 7, 2008 3:38 PM by Sneha Parikh

    Error in ProcessValidationsPhase in Richfaces Suggestionbox

    Sneha Parikh Newbie

      I am trying to use Richfaces 3.1.2 suggestionbox with Trinidad 1.0.2 and I am having issues. I have a Trinidad table in which I put the Richfaces suggestionbox. The code is as below:



      <tr:table var="row"
      value="#{PropertyManagementProcessBean.itemList}"
      id="propertytable" width="100%" emptyText="#{prop.nodatafound}"
      binding="#{PropertyManagementProcessBean.uixTable}">
      <tr:column align="center" headerText="#{prop.item}" width="30%">
      <h:outputText value="#{row.propItem.propItemName}" />
      </tr:column>
      <tr:column align="center" headerText="#{prop.description}"
      width="40%">
      <h:inputText value="#{row.description}" />
      </tr:column>
      <tr:column align="center" headerText="#{prop.quantity}"
      width="30%">
      <h:inputText value="#{row.quantity}" />
      </tr:column>
      </tr:table>
      <tr:table var="row1"
      value="#{PropertyManagementProcessBean.newItemList}"
      width="100%"
      binding="#{PropertyManagementProcessBean.uixNewItemsTable}">
      <tr:column align="center" width="30%">
      <h:inputText value="#{row1.propItemName}" id="text" />
      <rich:suggestionbox width="20" height="20" for="text" var="result"
      id="suggestionBoxId" ajaxSingle="true" selfRendered="true"
      suggestionAction="#{PropertyManagementProcessBean.getSuggestedPropItems}">
      <h:column>
      <h:outputText value="#{result}"></h:outputText>
      </h:column>
      </rich:suggestionbox>
      </tr:column>
      <tr:column align="center" width="40%">
      <h:inputText value="#{row1.description}" />
      </tr:column>
      <tr:column align="center" width="30%">
      <h:inputText value="#{row1.quantity}" />
      </tr:column>
      </tr:table>


      When I enter a character in the textbox and suggestionbox tries to grab the list of suggestions, it throws and error in ProcessValidation phase of Faces lifecycle.



      ERROR [com.sun.faces.lifecycle.ProcessValidationsPhase] - Error testing property 'description' in bean of type null
      javax.faces.el.PropertyNotFoundException: Error testing property 'description' in bean of type null
      at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
      at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
      at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
      at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:345)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:713)
      at javax.faces.component.UIInput.validate(UIInput.java:638)
      at javax.faces.component.UIInput.executeValidate(UIInput.java:849)
      at javax.faces.component.UIInput.processValidators(UIInput.java:412)
      at org.apache.myfaces.trinidad.component.ChildLoop$Validate.process(ChildLoop.java:85)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:55)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:48)
      at org.apache.myfaces.trinidad.component.UIXColumn.processValidators(UIXColumn.java:97)
      at org.apache.myfaces.trinidad.component.UIXCollection.processComponent(UIXCollection.java:919)
      at org.apache.myfaces.trinidad.component.TableUtils$3.process(TableUtils.java:282)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:55)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:48)
      at org.apache.myfaces.trinidad.component.TableUtils.__processStampedChildren(TableUtils.java:277)
      at org.apache.myfaces.trinidad.component.UIXTable._processStamps(UIXTable.java:412)
      at org.apache.myfaces.trinidad.component.UIXTable.processFacetsAndChildren(UIXTable.java:284)
      at org.apache.myfaces.trinidad.component.UIXCollection.validateChildrenImpl(UIXCollection.java:200)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:924)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:759)
      at org.apache.myfaces.trinidad.component.ChildLoop$Validate.process(ChildLoop.java:85)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:55)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:48)
      at org.apache.myfaces.trinidad.component.UIXColumn.processValidators(UIXColumn.java:97)
      at org.apache.myfaces.trinidad.component.UIXCollection.processComponent(UIXCollection.java:919)
      at org.apache.myfaces.trinidad.component.TableUtils$3.process(TableUtils.java:282)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:55)
      at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:48)
      at org.apache.myfaces.trinidad.component.TableUtils.__processStampedChildren(TableUtils.java:277)
      at org.apache.myfaces.trinidad.component.UIXTable._processStamps(UIXTable.java:412)
      at org.apache.myfaces.trinidad.component.UIXTable.processFacetsAndChildren(UIXTable.java:284)
      at org.apache.myfaces.trinidad.component.UIXCollection.validateChildrenImpl(UIXCollection.java:200)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:924)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:759)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
      at org.apache.myfaces.trinidad.component.UIXCollection.processComponent(UIXCollection.java:919)
      at org.apache.myfaces.trinidad.component.TableUtils.__processChildren(TableUtils.java:306)
      at org.apache.myfaces.trinidad.component.UIXPage.processFacetsAndChildren(UIXPage.java:149)
      at org.apache.myfaces.trinidad.component.UIXCollection.validateChildrenImpl(UIXCollection.java:200)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:924)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:759)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:940)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:924)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:759)
      at javax.faces.component.UIForm.processValidators(UIForm.java:170)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:940)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:924)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:759)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
      at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
      at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
      at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
      at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:173)
      at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
      at org.dotcomm.errorhandling.ExceptionRedirectingFacesServlet.service(ExceptionRedirectingFacesServlet.java:71)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      at org.dotcomm.acegi.RedirectingAuthenticationFilte




      Any help is appreciated.



        • 1. Re: Error in ProcessValidationsPhase in Richfaces Suggestion
          Sneha Parikh Newbie

          Even if a I remove the suggestionbox , the error persists if i have richfaces jars and richfaces filter in web.xml. It seems like a trinidad and richfaces compatibility issue. I also tried putting in a4j-trinidad.jar but no change. My web.xml looks like :

          <!-- Filters ***************************************************************
          Ajax4jsf filter needs to be mentioned first -->

          <display-name>RichFaces Filter</display-name>
          <filter-name>richfaces</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
          <init-param>
          <param-name>forceparser</param-name>
          <param-value>false</param-value>
          </init-param>


          <filter-name>trinidad</filter-name>
          <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>


          <filter-name>hibernateFilter</filter-name>
          <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>


          <!-- acegi filters -->


          <filter-name>RequestContextFilter</filter-name>
          <filter-class>
          org.springframework.web.filter.RequestContextFilter
          </filter-class>


          <filter-mapping>
          <filter-name>RequestContextFilter</filter-name>
          <servlet-name>faces</servlet-name>
          </filter-mapping>


          <filter-name>Acegi Filter Chain Proxy</filter-name>
          <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
          <init-param>
          <param-name>targetBean</param-name>
          <param-value>acegiFilterChainProxy</param-value>
          </init-param>


          <filter-mapping>
          <filter-name>Acegi Filter Chain Proxy</filter-name>
          <url-pattern>*.jsp</url-pattern>
          FORWARD
          REQUEST
          </filter-mapping>

          <filter-mapping>
          <filter-name>richfaces</filter-name>
          <servlet-name>faces</servlet-name>
          REQUEST
          FORWARD
          INCLUDE
          </filter-mapping>


          <filter-name>request tracker</filter-name>
          <filter-class>org.dotcomm.tracking.TrackingServletFilter</filter-class>
          <init-param>
          <param-name>requestTrackerBean</param-name>
          <param-value>requestTracker</param-value>
          </init-param>


          <filter-mapping>
          <filter-name>request tracker</filter-name>
          <url-pattern>*.jsp</url-pattern>
          FORWARD
          </filter-mapping>

          <!-- Filter Mappings ******************************************************** -->
          <filter-mapping>
          <filter-name>trinidad</filter-name>
          <servlet-name>faces</servlet-name>
          </filter-mapping>
          <filter-mapping>
          <filter-name>hibernateFilter</filter-name>
          <url-pattern>/*</url-pattern>
          </filter-mapping>



          Please let me know if i am missing something in the configuration.

          • 2. Re: Error in ProcessValidationsPhase in Richfaces Suggestion
            Sneha Parikh Newbie

            Here are the jars i am using:

            richfaces-api-3.2.1.SP1.jar
            richfaces-imp-3.2.1.SP1.jar
            richfaces-ui-3.2.1.SP1.jar
            a4j-trinidad.jar
            trinidad-api-1.0.1.jar
            trinidad-impl-1.0.1.jar
            oscache-2.3.2.jar

            and other spring and hibernate and other jars.

            • 3. Re: Error in ProcessValidationsPhase in Richfaces Suggestion
              Sneha Parikh Newbie

              Actually i found that the moment i put in richfaces jars and even if i dont have any richfaces code in the page, it gives me this error. May be it is something to do with the compatiblity between Richfaces and trinidad. I tried using a4j-trinidad.jar but no success.