Search code examples
javaxmlicefaces

ICEFaces 'Content is not allowed in prolog' Error


I have an JSF/ICEFaces application that is works fine but I keep getting this error. Although the application continues normally, I still get that error now and then. As far as I understand it's complaining about having something in the file before XML header but I'm not sure why I'm getting this I'm using ICEfaces that generates XML back and forth for AJAX.

Any ideas?

Thanks,

Tam

12:59:17,010 ERROR [Digester] Parse Fatal Error at line 1 column 1: Content is not allowed in prolog. org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(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.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.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) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)


Solution

  • This typically occurs if a jspx is not a valid XML file. There should be one root f:view element, and namespace imports should be placed under it.

    Check out this file for an example structure of jspx file.