4 Replies Latest reply on Jun 22, 2011 10:37 AM by werwolfgang

    Richfaces 3.3.3 and JSF 2.0 with glassfish v3

      Hello richfaces talents

        i am trying to configure richfaces 3.3.3 on glassfish v3 to take advantage of jsf 2.0

      but i am not succesful i am getting this error

      it lool like runtime is not picking up the jsf tags

       

      any help suggetions would be appriciated

       

       

       

      com.sun.facelets.tag.TagException: /home.xhtml @9,13 <h:body> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: body
           at com.sun.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:193)
           at com.sun.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:194)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
           at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
           at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
           at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
           at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
           at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
           at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:232)
           at com.sun.facelets.compiler.Compiler.compile(Compiler.java:105)
           at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218)
           at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149)
           at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100)
           at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
           at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
           at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
           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:332)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
           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)
        • 1. Re: Richfaces 3.3.3 and JSF 2.0 with glassfish v3
          ilya_shaikovsky
          unfortunatelly as we declared in our JSF 2 compatibility page - 3.3.3 not supports JSF 2 VDL and works only with external facelets impl. And without VDL usage - new JSF tags will not be available.
          • 2. Re: Richfaces 3.3.3 and JSF 2.0 with glassfish v3

            thanks Ilya

              i got your answer thanks for responding

            • 3. Re: Richfaces 3.3.3 and JSF 2.0 with glassfish v3
              maxmcbyte

              Hello khurram;

               

              I am working with GlassFish v3 (build 74.2), NetBeans 6.8 and RichFaces-333-Beta-1minus the VDL, so far so good.

               

              I had to slog throgh to get my environment setup and I am not sure if it is "proper" but it is certainly working!

               

              Here is an example of the libraries I included followed by my web.xml file. Note: the comments at the bottom "BEGIN.JSF2-JSF1.2-FACELET-GFV3.WORKAROUND" are my own interpretation of the issue and my not be 100% correct but it is my current understanding.

               

              Good luck...

               

              Screenshot-2.png

               

              WEB.XML

               

              <?xml version="1.0" encoding="UTF-8"?>
              <web-app
                  version="3.0"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

               

              <!-- BEGIN.MINIMUM.SETUP ************************************************** -->

               

                  <servlet>
                      <servlet-name>Faces Servlet</servlet-name>
                      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                      <load-on-startup>1</load-on-startup>
                  </servlet>

               

                  <servlet-mapping>
                      <servlet-name>Faces Servlet</servlet-name>
                      <url-pattern>/faces/*</url-pattern>
                  </servlet-mapping>

               

              <!-- END.MINIMUM.SETUP ************************************************** -->

               

                  <session-config>
                      <session-timeout>
                          30
                      </session-timeout>
                  </session-config>

               

                  <welcome-file-list>
                      <welcome-file>faces/index.xhtml</welcome-file>
                      <!--welcome-file>faces/welcome.xhtml</welcome-file -->
                  </welcome-file-list>

               

                  <display-name>GGM2_0001</display-name>


              <!-- BEGIN.FACELETS.SETUP ************************************************** -->

               

                  <context-param>
                      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                      <param-value>.xhtml</param-value>
                  </context-param>

               

              <!-- END.FACELETS.SETUP -->


              <!-- BEGIN.RICHFACES.SETUP ************************************************** -->

               

                  <!-- begin.skins.section -->

               

                   <!--context-param>
                      <param-name>org.richfaces.SKIN</param-name>
                      <param-value>DEFAULT</param-value>
                  </context-param-->

               

                  <!--context-param>
                      <param-name>org.richfaces.SKIN</param-name>
                      <param-value>NULL</param-value>
                  </context-param-->

               

                  <!--context-param>
                      <param-name>org.richfaces.SKIN</param-name>
                      <param-value>plain</param-value>
                  </context-param-->

               

                  <context-param>
                      <param-name>org.richfaces.SKIN</param-name>
                      <param-value>ggm</param-value>
                  </context-param>

               

                  <!-- end.skins.section -->

               

                  <context-param>
                      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                  </context-param>

               

                  <filter>
                      <display-name>RichFaces Filter</display-name>
                      <filter-name>richfaces</filter-name>
                      <filter-class>org.ajax4jsf.Filter</filter-class>
                  </filter>

               

                  <filter-mapping>
                      <filter-name>richfaces</filter-name>
                      <servlet-name>Faces Servlet</servlet-name>
                      <dispatcher>REQUEST</dispatcher>
                      <dispatcher>FORWARD</dispatcher>
                      <dispatcher>INCLUDE</dispatcher>
                  </filter-mapping>

               

              <!-- END.RICHFACES.SETUP ************************************************** -->

               


              <!-- BEGIN.JSF2-JSF1.2-FACELET-GFV3.WORKAROUND ************************************************** -->

               

              <!-- RichFaces 3.3.3 does not support JSF 2 built-in facelets view definition language (VDL)

               

              Facelets 1.1.15 should still be used because of dependencies in RichFaces from the Tag Handlers classes.

               

              To avoid errors like
              "Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
              java.lang.NoClassDefFoundError: com/sun/facelets/tag/jsf/ComponentHandler"

               

              This happens because the application has dependencies on internal classes of Facelets 1.1.x.
              That makes the application non-compatible with Mojarra 2.x which comes bundled with Facelets 2.0.

               

              The following will disable (turn off the VDL viewhandler)
              The Facelets 2.0 baked in Mojarra by adding the following application wide context parameter in "web.xml"
              -->

               

                  <context-param>
                      <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
                      <param-value>true</param-value>
                  </context-param>

               

                  <!-- END.JSF2-JSF1.2-FACELET-GFV3.WORKAROUND ************************************************** -->

               

              </web-app>

              • 4. Re: Richfaces 3.3.3 and JSF 2.0 with glassfish v3
                werwolfgang

                Hi

                We used richfaces v 3.3.3Final in our project (jsf 1.2 and jboss 4.2.2) but now we have to migrate our projecr into glassfish v3 and jsf 2.  We tried to use richfaces 4.0.0  but there isn't < rich:listShuttle > component which we used and we tried to run richfaces v 3.3.3Final with jsf 2

                We replaced richfaces-impl to richfaces-impl-jsf2. But when server is start running we have warnings in log

                 

                 

                 

                 

                 

                [#|2011-06-22T09:11:01.944+0300|WARNING|glassfish3.0.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=30;_ThreadName=Thread-1;|JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.ajax4jsf.taglib.html.facelets.ActionParamHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.|#]

                 

                 

                [#|2011-06-22T09:11:01.965+0300|WARNING|glassfish3.0.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=30;_ThreadName=Thread-1;|JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class '[handler-class: null]' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.|#]

                 

                 

                [#|2011-06-22T09:11:01.980+0300|WARNING|glassfish3.0.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=30;_ThreadName=Thread-1;|JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.ajax4jsf.webapp.taglib.AjaxComponentHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.|#]

                 

                 

                [#|2011-06-22T09:11:01.992+0300|WARNING|glassfish3.0.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=30;_ThreadName=Thread-1;|JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.ajax4jsf.webapp.taglib.AjaxComponentHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.|#]

                 

                 

                [#|2011-06-22T09:11:02.012+0300|WARNING|glassfish3.0.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=30;_ThreadName=Thread-1;|JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class '[handler-class: null]' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.|#]

                etc....

                 

                 

                 

                and have exception when we want to open the page.

                 

                 

                 

                [#|2011-06-22T09:13:19.983+0300|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=31;_ThreadName=http-thread-pool-8443-(1);|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception

                java.lang.NullPointerException: Argument Error: Parameter viewId is null

                          at com.sun.faces.util.Util.notNull(Util.java:221)

                          at com.sun.faces.application.view.MultiViewHandler.getActionURL(MultiViewHandler.java:270)

                          at org.ajax4jsf.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:86)

                          at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:234)

                          at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:137)

                          at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:823)

                          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1611)

                          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)

                          at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:420)

                          at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:209)

                          at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)

                          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

                          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

                          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)

                          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

                          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

                          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)

                          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)

                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)

                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)

                 

                 

                 

                Could you give the advice what we can do?