11 Replies Latest reply on Dec 15, 2009 3:36 PM by kito99

    Facelet taglib problem with 3.3.3 snapshot

    kito99

      I'm trying out RichFaces 3.3.3 SNAPSHOT (as of 12/10) with Mojarra 2.02. I converted a fairly simple page from RichFaces 3.3.2 and Mojarrra 1.2 and got the following exception (on Tomcat 6):

      SEVERE: Error Rendering View[/pages/admin.xhtml]
      javax.faces.view.facelets.TagException: /pages/admin.xhtml @40,19 <rich:column> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: column
       at com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:285)
       at com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:225)
       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.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:385)
       at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:361)
       at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:117)
       at com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:331)
       at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:215)
       at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:156)
       at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:713)
       at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:351)
       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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       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:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
       at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
       at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
       at org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
       at java.lang.Thread.run(Thread.java:637)


      If I look at rich.taglib.xml (in richfaces-ui-xxx.jar), the column tag is indeed defined. That taglib still uses the old Facelets DTD, but a quick change to the JSF 2 schema doesn't seem to help.

      Any ideas?

        • 1. Re: Facelet taglib problem with 3.3.3 snapshot
          nbelaevski

          Hi,

          Try switching off built-in Facelets and using external ones (e.g. 1.1.15).

          • 2. Re: Facelet taglib problem with 3.3.3 snapshot
            kito99

             


            Try switching off built-in Facelets and using external ones (e.g. 1.1.15).


            Ok. I was thinking about that. Here's what I did:

            * Added the com.sun.facelets.FaceletsViewHandler back to faces-config.xml
            * Added jsf-facelets.jar back to the lib directory.
            * Added the following web.xml:
             <context-param>
             <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
             <param-value>true</param-value>
             </context-param>
             <context-param>
             <param-name>facelets.REFRESH_PERIOD</param-name>
             <param-value>1</param-value>
             </context-param>
             <context-param>
             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
             <param-value>.xhtml</param-value>
             </context-param>
            


            This does the trick for a simple page with <rich:dataTable>. However, using <rich:extendedDataTable> instead yields the dreaded Facelets "duplciate id" error.

            Is Facelets 1.1.5 (instead of JSF 2 Facelets) a requirement for now?

            • 3. Re: Facelet taglib problem with 3.3.3 snapshot
              nbelaevski

              Hi,

               

              Yes, RF 3.3.x works with external 1.x Facelets. BTW, you should be using richfaces-impl-jsf2 (http://snapshots.jboss.org/maven2/org/richfaces/framework/richfaces-impl-jsf2/), not richfaces-impl.

               

              RF 4.x will be the version fully compatible with JSF 2.0 and built-in Facelets.

               

              Talking about duplicate IDs exception: can you please post page code?

              • 4. Re: Facelet taglib problem with 3.3.3 snapshot
                jbalunas
                Agreed - I think we could run into an unknown # of issues for 3.3.3 which would nothing but slow down progress and focus for 4.0.

                3.3.3 is just for compatibility of existing applications, and using it with new JSF 2 development may have issues like this.
                • 5. Re: Facelet taglib problem with 3.3.3 snapshot
                  kito99

                  nbelaevski wrote:

                   

                  Hi,

                   

                  Yes, RF 3.3.x works with external 1.x Facelets. BTW, you should be using richfaces-impl-jsf2 (http://snapshots.jboss.org/maven2/org/richfaces/framework/richfaces-impl-jsf2/), not richfaces-impl.

                   

                  RF 4.x will be the version fully compatible with JSF 2.0 and built-in Facelets.

                   

                  Talking about duplicate IDs exception: can you please post page code?

                  Ok, but are you saying that RF 3.3.3 requires Facelets 1.1x when used with JSF 2?

                   

                  For the duplicate id problem, I think it was related to using the ExtendedDataTable. I switched to the standard RichFaces DataTable, and all of those problems disappeared. I think the standard one is more stable anyway, so we'll probably stick with it for now.

                   

                  Thanks for the tip for the other impl JAR. You guys may want to mention that on the snapshots download page.

                  • 6. Re: Facelet taglib problem with 3.3.3 snapshot
                    kito99

                    jbalunas@redhat.com wrote:

                     

                    Agreed - I think we could run into an unknown # of issues for 3.3.3 which would nothing but slow down progress and focus for 4.0.

                    3.3.3 is just for compatibility of existing applications, and using it with new JSF 2 development may have issues like this.

                    I see what you're saying, but I am migrating existing applications :-). And from what you've said, 4.0 is still several months out.

                     

                    FYI, I just found what may be a new bug: https://jira.jboss.org/jira/secure/ManageAttachments.jspa?id=12400328.

                    • 7. Re: Facelet taglib problem with 3.3.3 snapshot
                      jbalunas

                      kito99 wrote:


                      I see what you're saying, but I am migrating existing applications :-). And from what you've said, 4.0 is still several months out.


                       

                      Just so we're on the same page your use case is migrating an existing application to JSF 2.0.  Part of that migration is switching the application to use JSF 2 VDL instead of facelets - correct?

                       

                      kito99 wrote:

                      FYI, I just found what may be a new bug: https://jira.jboss.org/jira/secure/ManageAttachments.jspa?id=12400328.

                      Thanks, we're investigating.

                      • 8. Re: Facelet taglib problem with 3.3.3 snapshot
                        jbalunas

                        kito99 wrote:


                        Thanks for the tip for the other impl JAR. You guys may want to mention that on the snapshots download page.

                        Good point.  Part of the 3.3.3 release is going to be a wiki page describing this in more detail.

                         

                        kito99 wrote:


                        For the duplicate id problem, I think it was related to using the ExtendedDataTable. I switched to the standard RichFaces DataTable, and all of those problems disappeared. I think the standard one is more stable anyway, so we'll probably stick with it for now.

                        Would it be possible for you to still post your code for this?  I would like to see if we can duplicate ( no pun intended ) the problem.

                        • 9. Re: Facelet taglib problem with 3.3.3 snapshot
                          ilya_shaikovsky

                          FYI, I just found what may be a new bug:
                          https://jira.jboss.org/jira/secure/ManageAttachments.jspa?id=12400328.
                          Issue investigated and updated.
                          • 10. Re: Facelet taglib problem with 3.3.3 snapshot
                            kito99

                            jbalunas@redhat.com wrote:

                             

                            kito99 wrote:


                            I see what you're saying, but I am migrating existing applications :-). And from what you've said, 4.0 is still several months out.


                             

                            Just so we're on the same page your use case is migrating an existing application to JSF 2.0.  Part of that migration is switching the application to use JSF 2 VDL instead of facelets - correct?

                             

                            Correct. However, the client is currently using JSP, so if we're stuck with Facelets 1.1.5 it won't be the end of the world -- most of the migration work is the same regardless.

                             

                            I would expect that anyone who's upgrading would want to use the JSF 2 VDL, though, since it provides access to all of the new features. I'm not interested in <f:ajax> (or behaviors in general) for this project, but the event handling and view parameters would be useful.

                            • 11. Re: Facelet taglib problem with 3.3.3 snapshot
                              kito99

                              ilya_shaikovsky wrote:

                               


                              FYI, I just found what may be a new bug:
                              https://jira.jboss.org/jira/secure/ManageAttachments.jspa?id=12400328.
                              Issue investigated and updated.

                              Thanks for the quick turnaround!