From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3967 invoked by alias); 22 Feb 2010 10:52:02 -0000 Received: (qmail 3949 invoked by uid 22791); 22 Feb 2010 10:52:01 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay2-v.mail.gandi.net (HELO relay2-v.mail.gandi.net) (217.70.178.76) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Feb 2010 10:51:55 +0000 Received: from localhost (front2-v.mgt.gandi.net [10.0.10.72]) by relay2-v.mail.gandi.net (Postfix) with ESMTP id 614F5135D0; Mon, 22 Feb 2010 11:51:51 +0100 (CET) MIME-Version: 1.0 Message-ID: <42586.1266835911@engelhart.org> To: "Andrew Haley" , "Chris Burdess" Reply-To: emmanuel@engelhart.org Content-Type: text/plain; charset="utf-8" X-Origin: 195.186.55.199 Date: Mon, 22 Feb 2010 10:52:00 -0000 Subject: Re: [SAXParser] org.xml.sax.SAXParseException: not a name start character: From: emmanuel@engelhart.org Cc: , Content-Transfer-Encoding: quoted-printable Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-02/txt/msg00011.txt.bz2 Le lun 22/02/10 10:49, "Chris Burdess" dog@bluezoo.org a =C3=A9crit: > Andrew Haley wrote: > > On 02/13/2010 11:24 AM, Emmanuel Engelhart wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >>=20 > >> Hi, > >>=20 > >> not sure to be on the right ML to report this behavior, please > help me > >> to find the right place to do it if not... and sorry for the > noise. > >>=20 > >> I use gcj on a LTS Ubuntu: > >> gcj (Ubuntu 4.4.1-5ubuntu2) 4.4.1 > >>=20 > >> My sample code may be downloaded here as Test.java: > >> https://bugzilla.wikimedia.org/attachment.cgi?id=3D7115 > >>=20 > >> and looks like that: > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > >> import javax.xml.parsers.SAXParser; > >> import javax.xml.parsers.SAXParserFactory; > >> import org.xml.sax.helpers.DefaultHandler; > >>=20 > >> public class Test { > >>=20 > >> public static void main(String argv[]) { > >>=20 > >> try { > >>=20 > >> SAXParserFactory factory =3D SAXParserFactory.newInstance(); > >> SAXParser saxParser =3D factory.newSAXParser(); > >>=20 > >> DefaultHandler handler =3D new DefaultHandler() {}; > >> saxParser.parse("test.xml", handler); > >>=20 > >> } catch (Exception e) { > >> e.printStackTrace(); > >> } > >> } > >> } > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > >>=20 > >> I compile it like following: > >> gcj -o test --main=3DTest Test.java > >>=20 > >> My XML file "test.xml" may be downloaded here: > >> https://bugzilla.wikimedia.org/attachment.cgi?id=3D7114 > >>=20 > >> By running the the binary I get the following error: > >> $ ./test > >> org.xml.sax.SAXParseException: not a name start character: "U+26" > >> at gnu.xml.stream.SAXParser.parse(libgcj.so.10) > >> at javax.xml.parsers.SAXParser.parse(libgcj.so.10) > >> at javax.xml.parsers.SAXParser.parse(libgcj.so.10) > >> at Test.main(test) > >> Caused by: javax.xml.stream.XMLStreamException: not a name start > >> character: "U+26" > >> at gnu.xml.stream.XMLParser.error(libgcj.so.10) > >> at gnu.xml.stream.XMLParser.readNmtoken(libgcj.so.10) > >> at gnu.xml.stream.XMLParser.readNmtoken(libgcj.so.10) > >> at gnu.xml.stream.XMLParser.readCharData(libgcj.so.10) > >> at gnu.xml.stream.XMLParser.next(libgcj.so.10) > >> at gnu.xml.stream.SAXParser.parse(libgcj.so.10) > >> ...3 more > >>=20 > >> Although the XML should be valid. > >>=20 > >> Has someone an idea to explain this behavior? > >>=20 > >> This "bug" impacts the Mediawiki mwdumper SW. T > >> The related bug (with more details) is available here: > >> https://bugzilla.wikimedia.org/show_bug.cgi?id=3D22137 > >=20 > > Mmmm, looks like it probably is a real bug. If you remind me next > > week I'll have a look. >=20 > I reproduced and fixed this bug, see the attached patch. If someone > could validate and commit it for me please do so, I don't have a > complete working build environment at the moment. Great! I have open a bug 10 minutes ago: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D43138 Regards Emmanuel=20