What encoding are your files using?
Have you tried a newer JDK?
Ted
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 10, 1999 2:00 AM
Subject: j-xerces under solaris?
> Hi All,
>
> I downloaded the Java xerces source-packages, compiled these and now
> i'm trying to run them.
> I experienced that they run perfectly under NT, but not under Solaris.
>
> My XML files are pretty large, ie. up to 80megs.
>
> Here is an extract of the code i've written to start the parser:
> String parserClass = "org.apache.xerces.parsers.SAXParser";
> parser = ParserFactory.makeParser(parserClass);
> parser.setDocumentHandler(this);
> parser.setErrorHandler(this);
> try {
> InputSource is = new InputSource(getIn());
> parser.parse(is);
> }catch(Exception se){
> Helper.handleException(se, "parsing XML");
> }
>
> Under Solaris I always get the following exception:
>
> The root element is required in a well-formed document.
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at org.xml.sax.SAXException.<init>(Compiled Code)
> at org.xml.sax.SAXParseException.<init>(Compiled Code)
> at org.apache.xerces.framework.XMLParser.reportError(Compiled
> Code)
> at
> org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(Compi
> led Code)
> at
> org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endOfIn
> put(Compiled Code)
> at
> org.apache.xerces.framework.XMLDocumentScanner.endOfInput(Compiled Code)
> at
> org.apache.xerces.framework.XMLParser.sendEndOfInputNotifications(Compil
> ed Code)
> at org.apache.xerces.framework.XMLParser.changeReaders(Compiled
> Code)
> at
> org.apache.xerces.readers.XMLEntityReader.changeReaders(Compiled Code)
> at
> org.apache.xerces.readers.AbstractCharReader.changeReaders(Compiled
> Code)
> at
> org.apache.xerces.readers.AbstractCharReader.lookingAtChar(Compiled
> Code)
> at
> org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatc
> h(Compiled Code)
> at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled Code)
> at org.apache.xerces.framework.XMLParser.parse(Compiled Code)
> at com.wdr.scmis.DBTarget.run(Compiled Code)
> at java.lang.Thread.run(Compiled Code)
>
> Sometimes the startElement() of the DocumentHandler is called, before
> the exception occurs, but just for any tag, not for the first, ie. the
> root one.
>
> I'm using JDK 1.7.0.5, on SunOS 5.6 Generic_105181-09 sun4u sparc
> SUNW,Ultra-2
>
> Does anyone have an idea, what my problem could be? ie, are there any
> solaris patches required?
>
> Thank you very much,
>
> Hans-Peter Frei
>
>
> This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail. Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses. The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message which arise as a result of e-mail transmission. If
> verification is required please request a hard-copy version. This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities or
> related financial instruments.
>
>