tags:

views:

873

answers:

2

Hello,

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)

A: 

Could you paste the top of the troublesome line. It might just be extra linefeeds or an erroneous character outside a tag.

Thorbjørn Ravn Andersen
+1  A: 

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.

javashlook
Thanks! this led me to the problem...I had at the top of the page (with f:view header) this line;xmlns:ui="http://java.sun.com/jsf/facelets"and I didn't have tag with ui but I wouldn't think it will cause that exception. After removing that line the exception disappeared
Tam