1 2 Previous Next 19 Replies Latest reply on Aug 23, 2012 3:10 AM by ba3999

    Richfaces generates exceptions while navigating to pages

    kanal

      Hi,

      After adding richfaces 4.x libraries to my project, i get exceptions after going to some pages in my application (which were working before adding richfaces).

      The most annoying thing is that those exceptions don't say anything usefull, usually they are just NullPointerExceptions.

       

      And for example, after logging in to my application i try to go to the page, which shows all users' logins taken from the database (i use EJB 3.0).

      Instead of page with users list i get this exception:

       

      java.lang.NullPointerException
           at com.sun.faces.application.view.StateManagementStrategyImpl$4.invokeContextCallback(StateManagementStrategyImpl.java:289)
           at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1253)
           at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
           at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
           at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
           at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:284)
           at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
           at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
           at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430)
           at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
           at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
           at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
           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.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
           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:619)
      
      

       

      Interesting thing is that there is no entry about this exception in server log. It is only showed on web browser, because in web.xml project state is set do Development.

      Another interesting thing is that after refreshing previous page, and then clicking once again link to the page with users, it works as it should :|

      But then after clicking that link one more time i get another exception:

       

      java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.sun.faces.application.view.StateHolderSaver
           at com.sun.faces.application.view.StateManagementStrategyImpl$4.invokeContextCallback(StateManagementStrategyImpl.java:288)
           at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1253)
           at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
           at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
           at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
           at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:284)
           at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
           at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
           at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430)
           at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
           at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
           at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
           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.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
           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:619)
      
      

       

      Of course everything works well without richfaces. I really have no idea what to do with this problem. I was searching for some answers on the internet but couldn't find anything usefull.

       

      So once again, these are the steps i do (assume that there are only 2 links in my menu section: main page, users):

      1) i log in and im navigated to the main page

      2) i click users link and get NullPointerException posted above

      3) i click on web browser's address bar and hit enter (address bar is set to main page)

      4) main page is rendered, so i click users link once again

      5) users page is rendered properly :O (earlier there was NullPointerException)

      6) i click one more time users link and page with users should be rendered once again, but i get ClassCastException posted above

       

      Very important thing:

      There are no richfaces components on my pages yet. Only richfaces SKIN has been applied ...and i get those exceptions ;/

       

      libs in my WEB-INF/lib folder:

      • cssparser-0.9.5.jar
      • richfaces-commons-api-4.0.0.20100826-M2.jar
      • richfaces-components-api-4.0.0.20100826-M2.jar
      • richfaces-components-ui-4.0.0.20100826-M2.jar
      • richfaces-core-api-4.0.0.20100826-M2.jar
      • richfaces-core-impl-4.0.0.20100826-M2.jar
      • sac-1.3.jar
      • slf4j-api-1.6.1.jar
      • slf4j-log4j12-1.6.1.jar
      • guava-r06.jar

       

      Application was tested on both:

      jboss-6.0.0.20100721-M4 (without guava-r06.jar because server didn't want to start with this lib)

      and

      glassfishv3 JEE6 (with all libs)

       

      Application contains of Dynamic Web Project and EJB Project put together in one Enterprise Application Project.

      I use JSF 2.0 (Mojarra) with Richfaces 4.x M2 (M1 generated the same exceptions).

       

      If anyone could help, i would be grateful.

        • 1. Re: Richfaces generates exceptions while navigating to pages
          nbelaevski

          Hi Paul,

           

          This problem reproduces even when there is no RichFaces in the project: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1801 .

          So, when skin resources are added, Mojarra's state saving in 2.0.3 breaks. Mojarra 2.0.2 worked just fine.

          • 2. Re: Richfaces generates exceptions while navigating to pages
            nbelaevski
            • 3. Re: Richfaces generates exceptions while navigating to pages
              kanal

              Hi Nick and thank you for your reply.

               

               

              Unfortunately, downgrading to Mojarra Project 2.0.2 didn't change anything :/

               

              First I added 'user library' with Mojarra 2.0.2 jars to my project.

               

              Then I replaced JBoss JSF libraries with my own, bacause i tought it could use the wrong ones.

               

               

              But still I get the same exceptions. Maybe there is another workaround for this problem?

              • 4. Re: Richfaces generates exceptions while navigating to pages
                nbelaevski

                Paul,

                 

                Try switching off skinning for standard controls by setting org.richfaces.enableControlSkinning=false in web.xml.

                Also can you please attach example project to research the issue?

                • 5. Re: Richfaces generates exceptions while navigating to pages
                  kanal

                  Sorry for so late reply Nick, but i couldn't do it earlier, I was unavailable until now :|

                   

                  I have done as you had told me. I disabled skinning by setting that property to false but it didn't help.

                  About example project, I will send you an email with it because I don't see here any option to attach file while replying.

                   

                  edit1

                  While editing post I can attach a file:D

                  Ok it is a zip file which contains 3 folders with DWP, EJB and EAP projects (there where exported to zip from eclipse).

                  The only thing to do is to define a datasource in application server named jdbc/mysqlDS.

                  In persistence.xml i use hibernate.hbm2ddl.auto property so the database schema will be created automatically.

                   

                  I will also attach EAR file.

                   

                  edit2

                  After logging into application (login: qwe, pass: qwe) just use links to navigate to administration module and try edit a role etc (exceptions will be thrown). I assume that JSF libraries are on application server.

                  • 6. Re: Richfaces generates exceptions while navigating to pages
                    nbelaevski

                    Hi Paul,

                     

                    Thanks for the example, it's very helpful! I'm working on the problem right now, sorry for the delay caused by my business trip. I'll get back to you ASAP.

                    • 7. Re: Richfaces generates exceptions while navigating to pages
                      kanal

                      I'm glad that you've managed to run the application Nick.

                      Maybe it will turns out that the problem is trivial. I hope it will be that way.

                      • 8. Re: Richfaces generates exceptions while navigating to pages
                        nbelaevski

                        Paul,

                         

                        It appeared that navigation causes this problem, so I've just committed the fix for the issue.

                        • 9. Re: Richfaces generates exceptions while navigating to pages
                          kanal

                          By saying that you committed the fix you mean it is in latest snapshot on nightly builds download section?

                          I don't know if I get it right.

                          I downloaded richfaces-showcase-4.0.0-20100917.172946-47.war and extracted libraries from it, but now deployement of my application fails.

                          ..but I guess it's a normal situation, beacuse these builds were not tested.

                          • 10. Re: Richfaces generates exceptions while navigating to pages
                            nbelaevski

                            By saying that you committed the fix you mean it is in latest snapshot on nightly builds download section?

                            I don't know if I get it right.

                            Yes, that's right.

                             

                            I downloaded richfaces-showcase-4.0.0-20100917.172946-47.war and extracted libraries from it, but now deployement of my application fails.

                            ..but I guess it's a normal situation, beacuse these builds were not tested.

                            Can you please post information for the failures you see? E.g. stack trace, etc.

                            • 11. Re: Richfaces generates exceptions while navigating to pages
                              kanal

                              It appears that it was my mistake. I have copied too many jars into my DWP_TS project's lib folder from that nightly build and there were some conflicts (a stack trace was huge:D).

                              Here are the jars that are in my lib folder (bold one are copied from the snapshot and replaced):

                              • cssparser-0.9.5.jar
                              • guava-r06.jar (the size of this 06 is the same as 05 so I didn't change it)
                              • sac-1.3.jar
                              • slf4j-api-1.6.1.jar
                              • slf4j-log4j12-1.6.1.jar
                              • richfaces-commons-api-4.0.0.20100826-M2.jar
                              • richfaces-components-api-4.0.0-SNAPSHOT.jar
                              • richfaces-components-ui-4.0.0-SNAPSHOT.jar
                              • richfaces-core-api-4.0.0-SNAPSHOT.jar
                              • richfaces-core-impl-4.0.0-SNAPSHOT.jar

                               

                              In this configuration, my application deploy successfully.

                              And yes, you fixed the problem with those exceptions from my first post, thank you very much:)

                              But something is still not right, or I missed some library.

                              Just after deploying fresh application, I click link to home page and I get these exceptions in server's console (not on page):

                               

                              09:52:20,609 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DWP_TS].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception: java.io.EOFException
                                  at java.io.DataInputStream.readInt(DataInputStream.java:375) [:1.6.0_21]
                                  at org.richfaces.renderkit.html.BaseGradient.readState(BaseGradient.java:289) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.util.Util.restoreResourceState(Util.java:604) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.resource.BaseResourceWrapper.restoreState(BaseResourceWrapper.java:128) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.util.Util.restoreResourceState(Util.java:616) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:343) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:155) [:4.0.0-SNAPSHOT]
                                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310) [:2.0.2-FCS]
                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100721-M4]
                                  at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.20100721-M4]
                                  at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR3]
                                  at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR3]
                                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.20100721-M4]
                                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.20100721-M4]
                                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:6.0.0.20100721-M4]
                                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.20100721-M4]
                                  at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
                              
                              09:52:20,625 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DWP_TS].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception: java.io.EOFException
                                  at java.io.DataInputStream.readInt(DataInputStream.java:375) [:1.6.0_21]
                                  at org.richfaces.renderkit.html.BaseGradient.readState(BaseGradient.java:289) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.util.Util.restoreResourceState(Util.java:604) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.resource.BaseResourceWrapper.restoreState(BaseResourceWrapper.java:128) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.util.Util.restoreResourceState(Util.java:616) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:343) [:4.0.0-SNAPSHOT]
                                  at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:155) [:4.0.0-SNAPSHOT]
                                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310) [:2.0.2-FCS]
                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100721-M4]
                                  at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.20100721-M4]
                                  at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR3]
                                  at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR3]
                                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100721-M4]
                                  at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.20100721-M4]
                                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.20100721-M4]
                                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.20100721-M4]
                                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:6.0.0.20100721-M4]
                                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.20100721-M4]
                                  at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
                              
                              

                               

                              On page it looks like it would work correctly, but errors are generated in console.

                              Situations when exceptions are shown in web browser are when I go for the first time to 'roles' and 'users' pages in administration module.

                              After hitting enter on address bar in web browser when I see the exception, page is rerendered and then it works fine (but still in the background exceptions are thrown; as the one above).

                               

                              The message in web browser is like this (the one that is showed after going to 'users' or 'roles' pages for the first time):

                               

                              exception
                              javax.servlet.ServletException
                                   javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
                                   org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63)
                              
                              root cause
                              java.lang.NullPointerException
                                   com.sun.faces.application.view.StateManagementStrategyImpl$4.invokeContextCallback(StateManagementStrategyImpl.java:289)
                                   javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1253)
                                   javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
                                   javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
                                   javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
                                   com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:284)
                                   com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
                                   com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
                                   com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430)
                                   com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
                                   com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
                                   com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
                                   com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
                                   com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
                                   javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
                                   org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63)
                              
                              
                              • 12. Re: Richfaces generates exceptions while navigating to pages
                                kanal

                                Nick,

                                the problem dosn't appear anyomre.

                                I have downloaded the latest nightly build richfaces-showcase-4.0.0-20100920.160629-50.war and replaced jars in my project.

                                Additionally I also replaced jsf libs in my jboss server lib folder to be sure that I use the same version of JSF implementation that richfaces development team.

                                 

                                Thank you very much for your support Nick.

                                • 13. Re: Richfaces generates exceptions while navigating to pages
                                  nbelaevski

                                  Paul,

                                   

                                  Thank you once again for providing the example!

                                  • 14. Re: Richfaces generates exceptions while navigating to pages
                                    dcpatton

                                    This appears to still be broken in 4.0.0.Final.

                                     

                                    Is there a nightly build with the fix you provided for 4.0.0.M2?

                                    1 2 Previous Next