13 Replies Latest reply on Apr 28, 2008 2:04 PM by Matt Schrader

    RichFaces 2 + Glassfish 2 not working

    Cristiano Andrade Newbie

      Hi,

      I am developing an application using Rich Faces 3.2 and Glassfish 2 and when add jars of RichFaces on dir /domains/domain1/lib. encountered the follow error on page of deploy application.

      type Exception report
      
      message
      
      descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: viewId:/applications/enterpriseApplications.jsf - View /applications/enterpriseApplications.jsf could not be restored.
      
      root cause
      
      javax.faces.application.ViewExpiredException: viewId:/applications/enterpriseApplications.jsf - View /applications/enterpriseApplications.jsf could not be restored.
      
      note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1_01 logs.
      
      



      When jar is removed the server normal starts

      How can solve this? Any idea?

      I'm so sorry because my english is terrible! :)

      Thanks in Advance

      Cristiano Andrade

        • 1. Re: RichFaces 2 + Glassfish 2 not working
          Sergey Smirnov Master

          We know that people successfully use Sun Java System
          Application Server 9.1_01. So, the server itself in not the issue. Something is wrong with particular configuration you have on your side

          • 2. Re: RichFaces 2 + Glassfish 2 not working
            Cristiano Andrade Newbie

            Hi Sergey,

            I tried install GlassFish V2 again and add only RichFaces and Apache Commons libraries and I don't change default configuration, but the error continue.

            Do you have any idea if there is any incompatibility between RichFaces and Apache Commons/

            Obs: I using Ubuntu 7.10

            Thanks in Advance

            Cristiano Andrade

            • 3. Re: RichFaces 2 + Glassfish 2 not working
              Sergey Smirnov Master

              RichFaces requires commons-collections-3.2.jar . This is only limitation about Apache Commons I remember.

              • 4. Re: RichFaces 3.2 + Glassfish 2 not working
                Cristiano Andrade Newbie

                yes, but commons collections depends of other commons.

                Do you have the contact of people that sucessfully use glassfish 2 and RichFaces 3.2/

                I tried many solutions and don't got sucess

                Thanks

                Cristiano Andrade

                • 5. Re: RichFaces 2 + Glassfish 2 not working
                  Nick Belaevski Master

                   

                  note The full stack traces of the exception and its root causes are available in the Sun Java System
                   Application Server 9.1_01 logs.


                  Could you please find stack trace and post it too?

                  • 6. Re: RichFaces 2 + Glassfish 2 not working
                    Cristiano Andrade Newbie

                    It's StackTrace

                    
                    javax.faces.application.ViewExpiredException: viewId:/applications/enterpriseApplications.jsf - View /applications/enterpriseApplications.jsf could not be restored.
                     at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
                     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                     at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                     at com.sun.enterprise.tools.admingui.servlet.DelayedInitFacesServlet.service(DelayedInitFacesServlet.java:89)
                     at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
                     at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
                     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
                     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
                     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
                     at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
                     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
                     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
                     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
                     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
                     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
                     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
                     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
                     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
                     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
                     at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
                     at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
                     at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
                     at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
                     at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
                     at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
                     at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
                     at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
                    |#]
                    
                    



                    and

                    
                    com.sun.faces.context.FacesContextImpl@1b33087) threw exception: java.lang.NullPointerException null
                    jmaki.runtime.jsf.AjaxWrapperPhaseListener.afterPhase(AjaxWrapperPhaseListener.java:69)
                    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
                    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                    com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
                    javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                    com.sun.enterprise.tools.admingui.servlet.DelayedInitFacesServlet.service(DelayedInitFacesServlet.java:89)
                    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
                    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
                    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
                    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
                    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
                    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
                    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
                    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
                    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
                    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
                    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
                    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
                    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
                    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
                    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
                    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
                    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
                    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
                    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
                    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
                    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
                    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
                    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
                    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
                    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
                    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
                    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
                    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
                    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
                    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
                    com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
                    
                    


                    Thanks

                    Cristiano Andrade


                    • 7. Re: RichFaces 2 + Glassfish 2 not working
                      Cristiano Andrade Newbie

                      someone has any idea of how solve this?

                      Tanks in Advance

                      Cristiano

                      • 8. Re: RichFaces 2 + Glassfish 2 not working
                        Ilya Shaikovsky Master

                        Could you please share sample in war? Or please paste the libraries list you're using.

                        • 9. Re: RichFaces 2 + Glassfish 2 not working
                          Cristiano Andrade Newbie

                          I have these library in domains/domain1/lib

                          barbecue-1.1.jar
                          brazilutils-0.1.1.jar
                          classes
                          commons-beanutils.jar
                          commons-collections-3.2.jar
                          commons-digester-1.8.jar
                          commons-el-1.0.jar
                          commons-fileupload-1.0.jar
                          commons-logging-1.1.jar
                          databases
                          iReport.jar
                          itext-1.3.1.jar
                          jasperreports-2.0.0.jar
                          jsf-facelets.jar
                          oro-2.0.8.jar
                          oscache-2.3.jar
                          quartz-all-1.6.0.jar
                          richfaces-api-3.2.0.GA.jar
                          richfaces-impl-3.2.0.GA.jar
                          richfaces-ui-3.2.0.GA.jar
                          tomahawk-1.1.6.jar
                          tomahawk-facelets-taglib.jar

                          Tanks

                          Cristiano

                          • 10. Re: RichFaces 2 + Glassfish 2 not working
                            Sergey Smirnov Master

                            You use tomahawk-1.1.6.jar that is incompatible with JSF 1.2. RichFaces 3.2.0 supports only JSF 1.2

                            • 11. Re: RichFaces 2 + Glassfish 2 not working
                              Cristiano Andrade Newbie

                              Hi Sergey,

                              I deleted all libs from application and add some these libraries:

                              commons-logging-1.1.jar
                              commons-beanutils.jar
                              commons-collections-3.2.jar
                              commons-digester-1.8.jar
                              commons-el-1.0.jar
                              commons-fileupload-1.0.jar
                              richfaces-api-3.2.0.GA.jar
                              richfaces-ui-3.2.0.GA.jar
                              richfaces-impl-3.2.0.GA.jar.
                              


                              But the problem persist, I belive that is have conflicts between libraries of Glassfish and Rich Faces 3.2

                              these are libraries of Glassfish 2:
                              ajax-wrapper-comp-1.0.2.jar
                              commons-fileupload-1.1.1.jar
                              commons-io-1.2.jar
                              dojo-0.4.1-ajax.jar
                              jsfcompounds-0.0.2.jar
                              jsftemplating-dynafaces-0.1.jar
                              jsftemplating.jar
                              json.jar
                              prototype-1.5.0.jar
                              


                              some that libs may causes conflict ?

                              Obs: The glassfish 2 uses JMaki

                              Tanks




                              • 12. Re: RichFaces 2 + Glassfish 2 not working
                                Sergey Smirnov Master

                                Yes, JMaki might be a problem. If you use Tomahawk 1.1.6, but not MyFaces 1.1.6, it will be OK.

                                • 13. Re: RichFaces 2 + Glassfish 2 not working
                                  Matt Schrader Newbie

                                  I am using GlassFish v2 and everything is working fine. I do not put the RichFaces and JSF jars in the app server's domain lib, but rather bundle it with the war. I realize this slows deploys down for production environments, but it is the only way I could get the server to run.

                                  Try that, and when I am in front of my code later I will see what dependencies might be causing you issue.