7 Replies Latest reply on Mar 28, 2007 12:24 PM by Ravi Mannan

    Richfaces demo not working

    diet ice Newbie

      I'm using jboss-4.0.5.GA
      I've tried deploying a few of the Ajax4jsf and RichFaces demos, and for ALL of them I'm haing problems deploying.

      In this case, I'm trying to run richfaces-demo-3.0.1-20070315.135447-1.war.

      I got an NULLPOINTEREXCEPTION that I solved by putting this in web.xml:

      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

      Then I got an NoClassDefFound exception and I had to add:
      el-api-1.0.jar and el-ri-1.0.jar into the war file.

      Now, I'm getting this exception:

      10:22:33,437 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jstl-fn.taglib.xml
      10:22:33,484 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/ajax4jsf-1.1.1-SNAPSHOT.jar!/META-INF/a4j.taglib.xml
      10:22:33,500 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-html.taglib.xml
      10:22:33,578 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-ui.taglib.xml
      10:22:33,609 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/richfaces-3.0.1-SNAPSHOT.jar!/META-INF/rich.taglib.xml
      10:22:33,656 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-core.taglib.xml
      10:22:33,687 ERROR [STDERR] Mar 27, 2007 10:22:33 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/Documents%20and%20Settings/homerjay/pkg/jboss-4.0.5.GA/
      server/default/./tmp/deploy/tmp51776richfaces-demo-3.0.1-20070315.135447-1-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jstl-core.taglib.xml
      10:22:34,562 ERROR [STDERR] Mar 27, 2007 10:22:34 AM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/welcome.xhtml]
      java.lang.IllegalArgumentException
      at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:139)
      at org.ajax4jsf.ajax.repeat.SequenceDataModel.getRowData(SequenceDataModel.java:147)
      at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setupVariable(UIDataAdaptor.java:431)
      at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowKey(UIDataAdaptor.java:305)
      at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowKey(UIDataAdaptor.java:281)
      at org.ajax4jsf.renderkit.html.RepeatRenderer.encodeChildren(RepeatRenderer.java:63)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
      at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
      at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
      at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
      at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      10:23:06,578 ERROR [STDERR] Mar 27, 2007 10:23:06 AM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/welcome.xhtml]
      java.lang.IllegalArgumentException
      at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:139)
      at org.ajax4jsf.ajax.repeat.SequenceDataModel.getRowData(SequenceDataModel.java:147)
      at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setupVariable(UIDataAdaptor.java:431)
      at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowKey(UIDataAdaptor.java:305)
      at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowKey(UIDataAdaptor.java:281)
      at org.ajax4jsf.renderkit.html.RepeatRenderer.encodeChildren(RepeatRenderer.java:63)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
      at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
      at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
      at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
      at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:688)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)



      I can't believe these simple war files/demos won't run in JBoss. Did anyone test this stuff before putting it online??

      Thanks in advance!

        • 1. Re: Richfaces demo not working
          Sergey Smirnov Master

          Nighly build's war files such as richfaces-demo-3.0.1-20070315.135447-1.war is created and put online automatically by Cruise Control. Nobody tests nightly builds BEFORE they are built actually. We do not use a time machine yet.

          Having el-api-1.0.jar and el-ri-1.0.jar in the war file causes exception in some containers that have embedded JSP2.1 support. So, it is a dilemma - "to have or not to have". It will work 50%/50% . As best I know, the latest builds included those jars. At least, http://livedemo.exadel.com:8091/richfaces-demo-3.0.1-20070324.000319-14/, I dropped into tomcat without any modification, works fine.

          • 2. Re: Richfaces demo not working
            Ravi Mannan Newbie

            I'm having exactly the same problem.
            I took richfaces-demo-3.0.1-20070324.000319-14.war and dropped it into jboss-4.0.5 and it didn't work.

            I got tomcat 5.5.23 and dropped the same war file and I got:


            org.apache.jasper.JasperException: Exception in JSP: /index.jsp:5

            2:
            3:
            4:
            5: <jsp:forward page="/welcome.jsf" />
            6:
            7:


            Stacktrace:
            org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:467)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
            org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
            org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


            And server output:

            INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
            Mar 28, 2007 10:43:19 AM org.apache.catalina.core.StandardHost start
            INFO: XML validation disabled
            Mar 28, 2007 10:43:20 AM org.apache.catalina.startup.HostConfig deployWAR
            INFO: Deploying web application archive richfaces-demo-3.0.1-20070324.000319-14.
            war
            Mar 28, 2007 10:43:20 AM org.apache.catalina.loader.WebappClassLoader validateJa
            rFile
            INFO: validateJarFile(C:\Documents and Settings\mightyjoeyoung\pkg\apache-tomcat-5.5.23
            \webapps\richfaces-demo-3.0.1-20070324.000319-14\WEB-INF\lib\servlet-api-2.4.jar
            ) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/
            servlet/Servlet.class
            Mar 28, 2007 10:43:21 AM org.apache.coyote.http11.Http11BaseProtocol start
            INFO: Starting Coyote HTTP/1.1 on http-8080
            Mar 28, 2007 10:43:21 AM org.apache.jk.common.ChannelSocket init
            INFO: JK: ajp13 listening on /0.0.0.0:8009
            Mar 28, 2007 10:43:21 AM org.apache.jk.server.JkMain start
            INFO: Jk running ID=0 time=0/31 config=null
            Mar 28, 2007 10:43:21 AM org.apache.catalina.storeconfig.StoreLoader load
            INFO: Find registry server-registry.xml at classpath resource
            Mar 28, 2007 10:43:21 AM org.apache.catalina.startup.Catalina start
            INFO: Server startup in 2094 ms

            Please help! I'd like to get started learning this project, but I can't run any examples....

            • 3. Re: Richfaces demo not working
              Ravi Mannan Newbie

              Ok I got rid of servlet-api.jar in the .war file and this got rid of this in the server output:

              INFO: validateJarFile(C:\Documents and Settings\mightyjoeyoung\pkg\apache-tomcat-5.5.23
              \webapps\richfaces-demo-3.0.1-20070324.000319-14\WEB-INF\lib\servlet-api-2.4.jar
              ) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/
              servlet/Servlet.class

              But I'm still getting an error when trying to load the webapp in my browser.

              • 4. Re: Richfaces demo not working
                Sergey Smirnov Master

                jdk version?

                • 5. Re: Richfaces demo not working
                  Ravi Mannan Newbie

                  >javac -version
                  javac 1.5.0_11

                  C:\Documents and Settings\xxxt>java -version

                  java version "1.5.0_11"
                  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
                  Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

                  • 6. Re: Richfaces demo not working
                    Sergey Smirnov Master

                    So, could you have a rational explanation why it complains about compliance with "Servlet Spec 2.3"?

                    • 7. Re: Richfaces demo not working
                      Ravi Mannan Newbie

                      I think that's been taken care of when I removed the servlet-api.jar in the .war file, as I posted before. It never complained when I reran the war file w.o. that jar file.

                      thx