1 Reply Latest reply on Oct 26, 2010 2:01 AM by Pradeep Nayak

    Caused by: org.xml.sax.SAXException

    Pradeep Nayak Newbie

      I'm testing  rich faces 4 milestone 3 build .

      I'm getting the  following error when I run a facelet .

       

       

      Facelet is as follows  Please suggest if I have to make any changes.

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

       

      <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">

       

      <head>
      <title>RichFaces Greeter</title>
      </head>
      <body>
      <f:view>
          <rich:dataTable value="#{tableBean.rows}" var="row" width="300px">
              <rich:column>
                  <f:facet name="header">
                      <h:outputText value="ID" />
                  </f:facet>
                  <h:outputText value="#{row.id}" />
              </rich:column>

       

              <rich:column>
                  <f:facet name="header">
                      <h:outputText value="NAME" />
                  </f:facet>
                  <h:outputText value="#{row.name}" />
              </rich:column>
          </rich:dataTable>
      </f:view>
      </body>
      </html>

       

       

       

       

      Oct 20, 2010 5:07:51 PM org.apache.catalina.core.AprLifecycleListener init
      INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\java\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\\JAVA\BIN;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Support Tools\;C:\Program Files\SecureCRT 3.0
      Oct 20, 2010 5:07:51 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
      WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:UI_RICHFACES' did not find a matching property.
      Oct 20, 2010 5:07:51 PM org.apache.coyote.http11.Http11Protocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      Oct 20, 2010 5:07:51 PM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 457 ms
      Oct 20, 2010 5:07:51 PM org.apache.catalina.core.StandardService start
      INFO: Starting service Catalina
      Oct 20, 2010 5:07:51 PM org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
      Oct 20, 2010 5:07:52 PM com.sun.faces.config.ConfigureListener contextInitialized
      INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/UI_RICHFACES'
      Oct 20, 2010 5:07:53 PM com.sun.faces.config.processor.ApplicationConfigProcessor processViewHandlers
      WARNING: JSF1069: Disabling the JSF 2.0 Facelets ViewHandler as an older FaceletViewHandler, com.sun.facelets.FaceletViewHandler, has been explicitly configured. If this is not desired behavior, remove the older FaceletViewHandler and library from your application.
      Oct 20, 2010 5:07:53 PM org.richfaces.cache.CacheManager getCacheFactory
      INFO: Selected fallback cache factory
      Oct 20, 2010 5:07:53 PM org.richfaces.cache.lru.LRUMapCacheFactory createCache
      INFO: Creating LRUMap cache instance using parameters: {org.richfaces.CONTROL_SKINNING=enable, javax.faces.DEFAULT_SUFFIX=.xhtml, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml, javax.faces.STATE_SAVING_METHOD=server, org.richfaces.SKIN=blueSky}
      Oct 20, 2010 5:07:53 PM org.richfaces.cache.lru.LRUMapCacheFactory createCache
      INFO: Creating LRUMap cache instance of 512 items capacity
      Oct 20, 2010 5:07:53 PM org.richfaces.application.InitializationListener onStart
      INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.20101004-M3 SVN r.19446
      Oct 20, 2010 5:07:54 PM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-8080
      Oct 20, 2010 5:07:54 PM org.apache.jk.common.ChannelSocket init
      INFO: JK: ajp13 listening on /0.0.0.0:8009
      Oct 20, 2010 5:07:54 PM org.apache.jk.server.JkMain start
      INFO: Jk running ID=0 time=0/47  config=null
      Oct 20, 2010 5:07:54 PM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 2605 ms
      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/jsf-impl.jar!/META-INF/mojarra_ext.taglib.xml
      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      SEVERE: Error Loading Library: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/richfaces-components-ui-4.0.0.20101004-M3.jar!/META-INF/a4j.taglib.xml
      java.io.IOException: Error parsing [jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/richfaces-components-ui-4.0.0.20101004-M3.jar!/META-INF/a4j.taglib.xml]:
          at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:396)
          at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:416)
          at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
          at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
          at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:189)
          at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:138)
          at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:89)
          at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:401)
          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:442)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
          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:127)
          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:298)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
          at java.lang.Thread.run(Unknown Source)
      Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/richfaces-components-ui-4.0.0.20101004-M3.jar!/META-INF/a4j.taglib.xml@2,255]
          at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:363)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:393)
          ... 24 more
      Caused by: org.xml.sax.SAXParseException: Document root element "facelet-taglib", must match DOCTYPE root "null".
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          ... 44 more

      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      SEVERE: Error Loading Library: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/richfaces-components-ui-4.0.0.20101004-M3.jar!/META-INF/rich.taglib.xml
      java.io.IOException: Error parsing [jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/richfaces-components-ui-4.0.0.20101004-M3.jar!/META-INF/rich.taglib.xml]:
          at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:396)
          at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:416)
          at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
          at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
          at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:189)
          at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:138)
          at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:89)
          at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:401)
          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:442)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
          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:127)
          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:298)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
          at java.lang.Thread.run(Unknown Source)
      Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/richfaces-components-ui-4.0.0.20101004-M3.jar!/META-INF/rich.taglib.xml@2,256]
          at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:363)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:393)
          ... 24 more
      Caused by: org.xml.sax.SAXParseException: Document root element "facelet-taglib", must match DOCTYPE root "null".
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          ... 44 more

      Oct 20, 2010 5:10:37 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/UI_RICHFACES/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml

        • 1. Re: Caused by: org.xml.sax.SAXException
          Pradeep Nayak Newbie

          Finally I could fix the problem

          Remove the following entry from web.xml

           


                  <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>

           

          remove ajax4jsf.jar from   web-inf/lib

           

          <context-param>

           

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

           

          Remove jsf-facelets.jar  from classpath .(   from web-inf/lib )

           

          Rich faces 4 is JSF2  compatible. So facelet  jar will not be used in this. But if the jar is present in the classpath some of the tag lib related xml files will get validated ,  resulting in the above error .