7 Replies Latest reply on Oct 22, 2008 6:10 AM by Nick Belaevski

    rich:datascroller - pageIndex ERROR - why?

    Lorenzo Ciucci Newbie

      My JSF web application throw this kind of Exception, every single time i see a page with a rich:datascroller :

      org.apache.myfaces.util.DebugUtils javax.faces.FacesException: Could not get property pageIndex of component.....

      TAGLIBS:
      <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://sourceforge.net/projects/jsf-comp/clientvalidators" prefix="cv"%>
      <%@ taglib uri="http://javascript4jsf.dev.java.net/" prefix="j4j" %>

      RICH:DATASCROLLER (linked to a rich:datatable):
      <rich:datascroller stepControls="auto" boundaryControls="auto" pagesVar="pages" pageIndexVar="pageIndex" fastControls="auto" id="myScroller" align="center" for="datalist" maxPages="20">


      MY LIBS:
      tomahawk-1.1.6.jar
      myfaces-impl-1.2.3.jar
      myface-api-1.2.3.jar
      commons-lang-2.1.jar
      jstl-1.1.0.jar
      commons-el-1.0.jar
      commons-collections-3.2.jar
      commons-beanutils-1.7.0.jar
      commons-codec-1.3.jar
      commons-digester-1.8.jar
      commons-discovery-0-4.jar
      commons-logging-1.1.1.jar
      standard.jar
      commons-collections-2.1.1.jar
      commons-dbcp-1.2.2.jar
      commons-fileupload-1.2.jar
      commons-httpclient.jar
      commons-io-1.4.jar
      commons-loggin-1.0.4.jar
      commons-pool-1.4.jar
      spring.jar
      richfaces-api.3.2.1.GA.jar
      richfaces-impl-3.2.1.GA.jar
      richfaces-ui-3.2.1.GA.jar


      Someone have an idea ?!?

      thanks
      L.

        • 1. Re: rich:datascroller - pageIndex ERROR - why?
          Ilya Shaikovsky Master

          Could you please just update the verison to 3.2.2 GA from the beggining? I've tested udner 3.3.0 SNAPSHOT and myFAces 1.2.4 and could not reproduce this error.

          • 2. Re: rich:datascroller - pageIndex ERROR - why?
            Lorenzo Ciucci Newbie

            Hi Ilya,
            i've tried richfaces 3.2.2 GA...
            Here you can find ALL my libraries :

            lib/activation.jar
            lib/antlr-2.7.6.jar
            lib/asm-attrs.jar
            lib/asm.jar
            lib/aspectj-1.5.4.jar
            lib/aspectjweaver.jar
            lib/backport-util-concurrent-3.0.jar
            lib/cglib-2.1.3.jar
            lib/clientvalidators-0.9.1.jar
            lib/commons-beanutils-1.7.0.jar
            lib/commons-codec-1.3.jar
            lib/commons-collections-2.1.1.jar
            lib/commons-collections-3.2.jar
            lib/commons-dbcp-1.2.2.jar
            lib/commons-digester-1.8.jar
            lib/commons-discovery-0.4.jar
            lib/commons-el-1.0.jar
            lib/commons-fileupload-1.2.jar
            lib/commons-httpclient.jar
            lib/commons-io-1.4.jar
            lib/commons-lang-2.1.jar
            lib/commons-logging-1.0.4.jar
            lib/commons-logging-1.1.1.jar
            lib/commons-pool-1.4.jar
            lib/cos.jar
            lib/dom4j-1.6.1.jar
            lib/ehcache-1.4.1.jar
            lib/hibernate3.jar
            lib/icu4j-4_0.jar
            lib/j4j.jar
            lib/jasypt-1.5.jar
            lib/jsr107cache-1.0.jar
            lib/jstl-1.1.0.jar
            lib/jta.jar
            lib/log4j-1.2.11.jar
            lib/myfaces-api-1.2.3.jar
            lib/myfaces-impl-1.2.3.jar
            lib/mysql-connector-java-5.0.8-bin.jar
            lib/richfaces-api-3.2.2.GA.jar
            lib/richfaces-impl-3.2.2.GA.jar
            lib/richfaces-ui-3.2.2.GA.jar
            lib/spring-test.jar
            lib/spring.jar
            lib/standard.jar
            lib/tomahawk-1.1.6.jar
            lib/xpp3_min-1.1.3.4.O.jar
            lib/xstream-1.2.2.jar

            ... the error is:

            [2008-10-20 12:53:02,750] ERROR org.apache.myfaces.util.DebugUtils javax.faces.FacesException: Could not get property pageIndex of component j_id_jsp_1227328325_7:myScroller


            Try to log errors with Log4J...
            I can't attach my "demo" project... is 30mb.
            Larry

            • 3. Re: rich:datascroller - pageIndex ERROR - why?
              Nick Belaevski Master

              Larry,

              I've tried to run richfaces-demo under MyFaces 1.2.4 - datascroller works ok. Can you please check server logs for full stack trace of the issue to see who is trying to access that property?

              • 4. Re: rich:datascroller - pageIndex ERROR - why?
                Lorenzo Ciucci Newbie

                again... hi to all !!
                no way to see something on my tomcat logs.
                Here you can find a eclipse DEMO project, with all my libraries.
                (hibernate is configured on a mysql database "test" user "root" password "")

                https://www.yousendit.com/download/Y2orQmtaYUlEa1ZjR0E9PQ

                It's seems like a faces "debug" message, but is very nasty... see it every time!! :(

                And other question for this demo project is... how can i change JSF state saving method from "client" to "server" ?!...


                • 5. Re: rich:datascroller - pageIndex ERROR - why?
                  Nick Belaevski Master

                  Hi,

                  I've fixed the problem with datascroller, it will appear in latest 3.3.0 snapshots; you can change log4j level to info to avoid these messages.

                  Use:

                  <context-param>
                   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                   <param-value>server</param-value>
                   </context-param>
                  or
                  <context-param>
                   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                   <param-value>client</param-value>
                   </context-param>
                  respectively.


                  • 6. Re: rich:datascroller - pageIndex ERROR - why?
                    Lorenzo Ciucci Newbie

                    Hi nbelaevski,
                    with the 3.3.0 snapshots & future releases... this "error" message disappear?... Cool ... :)

                    Now i'm trying to configure the STATE_SAVING_METHOD to "server" for my real application, the demo work fine (in this case i've only to change the param value)...
                    The application use "Sessions" for authenticate users, after the login i receive an ViewExpiredException...
                    It's seems that is a common issue of configuration of a PhaseListener... but i'm not able to solve it... someone have an idea?
                    The problem don't exist if the STATE_SAVING_METHOD is "client".

                    • 7. Re: rich:datascroller - pageIndex ERROR - why?
                      Nick Belaevski Master

                      That can happen if you cleaned saved view states stored in session. How do you get this issue? Please post the related code.