6 Replies Latest reply on Jan 24, 2008 2:33 AM by moroczt

    Problems with upgrading to a newer Richfaces version

    moroczt

      Hello!

      I have the folllowing (strange?) problem:

      We develope a web application for 3 years,
      used components:
      Tomcat 5.5.23, JSF 1.1, RichFaces 3.0.1,Tiles, Tomahawk.
      Everything worked correctly so far.

      I would like to use rich:tooltip, and I realized that this component was
      develpoed later (in another project we use it with Richfaces 3.1.2, Faclets)
      so I decided to ugrade to Richfaces 3.1.2.

      I thought that only replacing the old ajax4jsf.jar and richfaces.jar with the new 3 richfaces-x.jar would be enough.
      After restarting the webb app ( and later restarting the whole Tomcat )
      and aftter navigating away from the first jsf page to any other jsf page I got this exception:


      java.lang.ClassCastException: [Ljava.lang.Object;
      javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1114)
      javax.faces.component.UIOutput.restoreState(UIOutput.java:179)
      javax.faces.component.html.HtmlOutputText.restoreState(HtmlOutputText.java:174)
      javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1007)
      javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1019)
      javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1019)
      javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1019)
      org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:246)
      com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:228)
      org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
      org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
      com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
      org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      com.weblib.ui.servlets.filters.SecurityCheckFilter.doFilter(SecurityCheckFilter.java:87)

      I checked everything in web.xml and faces-config.xml,
      even tried some slight changes but the same error occuers always.
      I tried the latest 3.1.3 version too. No avail.

      (Downgrading to older version stops this error,everything goes fine.)

      I do not have any idea what to do now.

      Please help me with some pieces of advice!

      Thanx in advance.




        • 1. Re: Problems with upgrading to a newer Richfaces version

          Clean your module directory and make sure that you have no serialized sessions hanging out.

          That should be a good first start.

          Whatty

          • 2. Re: Problems with upgrading to a newer Richfaces version
            moroczt

            Thanx for your advice.

            I deleted the directory "${tomcathome}/work/Catalina/mywebapp/", but it did not help.

            We do not deploy war-s ( in development environment),
            but hold the whole project inside the Tomcat's webapps dir.
            There not exists the old jars.
            (The "Clean and build" does not touch the jars in the lib dir, but the classes dir.)

            Well I do not know where to check "serialized sessions" ..

            But may be i misunderstood what you meant by module directory.






            • 3. Re: Problems with upgrading to a newer Richfaces version

              I would blow away everything under the

              [workspace]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\mywebapp

              directory, but not the directory itself and rebuild / redeploy. See if that helps, otherwise hopefully someone else has a solution for you.

              Also make sure that any applicable TLD(s) (if any) match the version of your jar files

              Whatty

              • 4. Re: Problems with upgrading to a newer Richfaces version
                moroczt

                I highly apreciate your advice.

                But i use Netbeans, and this project has a custom ant build.xml.

                I do not know about any place where "old" ajax4jsf and RichFaces components/fragments could be hidden. :-(

                The "WEB-INF/classes" contains only our business logic classes, customMessages.properties, and labels.properties.

                The content of the "WEB-INF/classes":

                2006.09.13. 07:54 118 757 commons-beanutils.jar
                2006.09.13. 07:54 170 902 commons-collections.jar
                2006.09.13. 07:54 559 366 commons-collections-3.1.jar
                2006.09.13. 07:54 109 131 commons-digester.jar
                2006.06.08. 01:14 31 909 commons-fileupload-1.1.1.jar
                2007.01.25. 19:06 83 619 commons-io-1.3.jar
                2006.05.24. 12:37 207 723 commons-lang-2.1.jar
                2006.09.13. 07:54 31 638 commons-logging.jar
                2006.11.28. 21:31 138 956 commons-validator-1.3.1.jar
                003.12.28. 22:00 65 261 jakarta-oro-2.0.8.jar
                2007.03.18. 16:41 33 028 jakarta-regexp-1.5.jar
                2006.11.28. 01:37 364 470 jsf-api.jar
                2006.11.28. 01:37 698 542 jsf-impl.jar
                2006.09.13. 07:54 21 029 jstl.jar
                2006.09.13. 07:54 391 434 mysql-connector-java-3.1.6-bin.jar
                2005.06.18. 21:04 105 672 nekohtml.jar
                2007.03.05. 08:53 123 220 oscache-2.3.jar
                2007.12.18. 12:35 111 979 richfaces-api-3.1.3.GA.jar
                2007.12.18. 12:35 1 298 805 richfaces-impl-3.1.3.GA.jar
                2007.12.18. 13:19 1 787 738 richfaces-ui-3.1.3.GA.jar
                2006.09.13. 07:54 363 490 standard.jar
                2006.09.13. 07:54 107 927 tiles.jar
                2007.03.02. 08:30 1 281 201 tomahawk-1.1.3.jar
                2006.03.31. 19:39 959 247 xercesImpl.jar
                2005.11.18. 11:42 1˙186 calendar.tld

                The content of "WEB_INF":
                2008.01.24. 08:05 classes
                2008.01.24. 08:18 lib
                2006.03.20. 09:13 src
                2008.01.09. 20:34 161˙740 faces-config.xml
                2005.03.16. 12:49 7˙868 struts-tiles.tld
                2007.01.08. 08:53 1˙559 taglib.tld (for our custom tags)
                2005.03.16. 12:49 939 tiles-defs.xml
                2008.01.23. 16:51 6˙994 web.xml

                • 5. Re: Problems with upgrading to a newer Richfaces version
                  moroczt

                  Sorry, there were some formatting problems

                  The content of "WEB_INF":
                  2008.01.24. 08:05 classes
                  2008.01.24. 08:18 lib
                  2006.03.20. 09:13 src
                  2008.01.09. 20:34 161 740 faces-config.xml
                  2005.03.16. 12:49 7 868 struts-tiles.tld
                  2007.01.08. 08:53 1 559 taglib.tld (for our custom tags)
                  2005.03.16. 12:49 939 tiles-defs.xml
                  2008.01.23. 16:51 6 994 web.xml

                  • 6. Re: Problems with upgrading to a newer Richfaces version
                    moroczt

                    and another correction:

                    the calendar.tld is -of course- inside the WEB-INf and not WEB-INF/lib.