5 Replies Latest reply on Mar 13, 2008 4:14 PM by Keith Naas

    faces-config.xml problem

    Hryhory Newbie

      Problem with faces-config.xml
      I am using:
      Seam 1.2
      JBoss 4.2.2.
      Eclipse 3.3.1
      I've just created a new seam web project in eclipse.


      So I'm getting following errors in JBoss Seam console:



      ERROR [Digester] Parse Error at line 2 column 14: Document is invalid: no grammar found.
      org.xml.sax.SAXParseException: Document is invalid: no grammar found.
           at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
           at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
           at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
           at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
           at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
           at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)............




      ERROR [Digester] Parse Error at line 2 column 14: Document root element "faces-config", must match DOCTYPE root "null".
      org.xml.sax.SAXParseException: Document root element "faces-config", must match DOCTYPE root "null".
           at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
           at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
           at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
           at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
           at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
           at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XMLParser.parse(Unknown Source).............



      Maybe, this is a bug...
      Regards, Hryhory

        • 3. Re: faces-config.xml problem
          Keith Naas Novice

          Hryhory,


          Next time, please don't use a file server for attachments that forces us to wait 60 seconds, enter a captcha (don't screw up cause you'll wait another 60 seconds) and finally click a download link to view it.  Most of us are donating our time to help so its a surefire way to get people not to help. 


          Just paste the stack trace in here
          surrounded by ticks (`).


          Since the startup stack trace is indicating an issue with faces-config.xml can you paste the faces-config.xml into this forum as Nicklas requested?


          Thanks,
          Keith

          • 4. Re: faces-config.xml problem
            Hryhory Newbie

            As you can see, error occures when reading config jar. faces-config.xml is within this jar.


            16:24:07,632 INFO  [FacesConfigurator] Reading config jar:file:/C:/Program Files/jboss-4.0.5.GA/server/default/lib/jboss-seam-ui.jar!/META-INF/faces-config.xml
            16:24:07,632 ERROR [Digester] Parse Error at line 2 column 14: Document is invalid: no grammar found.
            org.xml.sax.SAXParseException: Document is invalid: no grammar found.



            faces-config.xml that has been generated by eclipse plugin (I didn't change anything):



            <?xml version='1.0' encoding='UTF-8'?>
            <!DOCTYPE faces-config PUBLIC
                      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
            
            
            <faces-config>
            
               <application>
                  <message-bundle>messages</message-bundle>
                  <!-- Disabled when using Ajax4JSF -->
                  <!--
                  <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
                  -->
               </application>
            
               <!-- Seam transaction management -->
               <lifecycle>
                  <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
               </lifecycle>
                
               <!-- No Seam transaction management -->
               <!--  
               <lifecycle>
                  <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
               </lifecycle>
               -->
            
            </faces-config>


            • 5. Re: faces-config.xml problem
              Keith Naas Novice

              So you are using Myfaces.  Are you using the correct version?


              This appears to be a pretty common error message.  You might try reading through a few of these to see if they help.


              google search


              markmail search