-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James,
On 10/11/12 3:59 PM, James Lampert wrote: > Pid * wrote: > >> Examine the first few bytes of the input. I seem to remember a >> character encoding issue causing this error. > > Of what input in particular? At least some of these exceptions > appear to be getting thrown in the process of bringing up Tomcat, > so I'm guessing we're not talking about a request. (apologies for the ugly formatting of the stack trace): > Error at line 1 column 1: Content is not allowed in prolog. > Throwable occurred: 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.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) at > org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) > at > org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515) > > at > org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328) > > [...] Tomcat is attempting to scan your webapp's web.xml file. So try something like this: $ head -n 1 webapps/yourwebapp/web.xml | od -t x1a This is what I get from my own web.xml: 0000000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 < ? x m l sp v e r s i o n = " 1 0000020 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 49 53 . 0 " sp e n c o d i n g = " I S 0000040 4f 2d 38 38 35 39 2d 31 22 3f 3e 0a O - 8 8 5 9 - 1 " ? > nl 0000054 The very first byte is 0x3c which is '<', etc. If you have a BOM (byte order mark) you might see something different. I seem to remember certain BOMs causing problems with Xerces: you might have to trim-off your BOMs and rely on the encoding="whatever" that you have in the XML document itself (which really should be the way things work with XML anyway). Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlB4JtcACgkQ9CaO5/Lv0PAkoQCffXrcdz7MMw8mzpxRBd9fjH0u VsIAnRgWqlFGiXODfG74VuS8TnTDdZ5J =HNCv -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org