Return-Path: Delivered-To: apmail-db-ddlutils-user-archive@www.apache.org Received: (qmail 87675 invoked from network); 15 Nov 2007 16:43:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2007 16:43:52 -0000 Received: (qmail 30978 invoked by uid 500); 15 Nov 2007 16:43:39 -0000 Delivered-To: apmail-db-ddlutils-user-archive@db.apache.org Received: (qmail 30961 invoked by uid 500); 15 Nov 2007 16:43:39 -0000 Mailing-List: contact ddlutils-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-user@db.apache.org Delivered-To: mailing list ddlutils-user@db.apache.org Received: (qmail 30950 invoked by uid 99); 15 Nov 2007 16:43:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2007 08:43:39 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.163.178.164] (HELO web34415.mail.mud.yahoo.com) (66.163.178.164) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 15 Nov 2007 16:43:26 +0000 Received: (qmail 25046 invoked by uid 60001); 15 Nov 2007 16:43:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=6GsQkNZlz7K6qEu+ARo06fRrl0q1UuofAiJLbs6N0jrAwYxIxjNuSN3UTOFoPbat06sl7gJswSl2qqwr8z8CQBIy5xyU90FH5l+Y1gxNJg1jtLaZuaWoXnyuUuT/lbaaxWSc/oV603Z/1OmNLL2+7QGTECQnBkuE1BC4X/Bz0X8=; X-YMail-OSG: Tdsu.40VM1msjnchlCYdv97AJpa4Uznmpct1l7W3Uku6iK5TcmlPFx0LNIof2zAPqOLqpiQ22JH.Cr00ztkAv9WwjawnRXRT2OuGsA3v.cun8bbVIa8- Received: from [86.202.101.124] by web34415.mail.mud.yahoo.com via HTTP; Thu, 15 Nov 2007 08:43:19 PST X-Mailer: YahooMailRC/818.27 YahooMailWebService/0.7.152 Date: Thu, 15 Nov 2007 08:43:19 -0800 (PST) From: Laurent ROCHE Subject: Re : Still one problem when managing schema ... others fixed ! To: ddlutils-user@db.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1259431089-1195144999=:24832" Message-ID: <122168.24832.qm@web34415.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1259431089-1195144999=:24832 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A----- Message d'origine ----=0ADe : Thomas Dudziak =0A= =C3=80 : ddlutils-user@db.apache.org=0AEnvoy=C3=A9 le : Jeudi, 15 Novembre = 2007, 17h16mn 35s=0AObjet : Re: Still one problem when managing schema ... = others fixed !=0A=0AHi=0A=0AOn Nov 14, 2007 10:25 AM, Laurent ROCHE =0A wrote:=0A=0A> I have made a few fixes to be able to e= xport/import data using=0A schemas (on=0A> PostgreSQL), see files included = at the end of the post.=0A> Most of them are quite ugly fixes but that work= s for me ... and=0A still, they=0A> should not interfere with other people= usage.=0A>=0A> I still have one problem though, when running the following= code:=0A> ...=0A> Platform platform =3D=0A> PlatformFactory= .createNewPlatformInstance(dataSource);=0A> final DatabaseDataIO da= taIO =3D new DatabaseDataIO();=0A> dataIO.setDetermineSchema(true);= =0A> dataIO.setSchemaPattern(XFR_OUT_SCHEMA);=0A> try {=0A>= FileOutputStream xmlFile =3D new FileOutputStream(xmlFPN);=0A>= DatabaseIO reader =3D new DatabaseIO();=0A> Databa= se model =3D reader.read(getModelFPN(),=0A XFR_OUT_SCHEMA);=0A> = dataIO.writeDataToXML(platform, model, xmlFile,=0A> XML_FILE_ENCODING);=0A= > xmlFile.close();=0A> } catch (IOException e) {=0A> = e.printStackTrace();=0A> log.error("Error: Could not = create " + xmlFPN);=0A> }=0A> ...=0A>=0A> I get the following = errors:=0A> ERROR [http-80-Processor24] Digester.error(1538) | Parse Error= =0A at=0A> line 2 column 32: Document root element "database", must match= =0A DOCTYPE root=0A> "null".=0A> org.xml.sax.SAXParseException: Document ro= ot element "database", must=0A match=0A> DOCTYPE root "null".=0A> at=0A= >=0A com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXP= arseException(ErrorHandlerWrapper.java:236)=0A> at=0A>=0A com.sun.org.a= pache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.ja= va:172)=0A> ...=0A> ERROR [http-80-Processor24] Digester.error(1538) | Par= se Error=0A at=0A> line 2 column 32: Document is invalid: no grammar found.= =0A> org.xml.sax.SAXParseException: Document is invalid: no grammar found.= =0A> at=0A>=0A com.sun.org.apache.xerces.internal.util.ErrorHandlerWrap= per.createSAXParseException(ErrorHandlerWrapper.java:236)=0A> ...=0A> The f= ile is created OK though ! ? ! ?=0A> What should I do, to get rid of this e= rror messages ?=0A> I understand they come from the parser going through th= e XML ... but=0A why=0A> don't I get these when using the Ant tasks ?=0A> I= must do something wrong somewhere !=0A> Let me know.=0A=0AThere seems to b= e a problem with the XML file that you're trying to=0Aread (the XML parser = is complaining about it).=0A=0A=0A=0AYes, I understand that but this is the= schema/model file created by the Ant Tasks, and it's readable without erro= rs by the Ant Tasks.=0A=0AHere are the first three lines of the model file:= =0A=0A=0A =0A=0AThe second line is where= the parser complains, talking about a DOCTYPE which is not defined.=0ADo I= need to define something else ?=0A=0A=0ACheers,=0AL.=0A=0A=0A=0A=0A=0A=0A = ______________________________________________________________________= _______ =0ANe gardez plus qu'une seule adresse mail ! Copiez vos mails vers= Yahoo! Mail --0-1259431089-1195144999=:24832--