db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent ROCHE <laurent_ro...@yahoo.com>
Subject Re : Can not read data file ==> OK
Date Sat, 24 Nov 2007 13:41:48 GMT
Hi again,

My mistake: in the code lines
            String[] xmlFiles  = {getXfrDir(fileName) };
            dataIO.writeDataToDatabase(platform, model, xmlFiles);
The variable fileName did not contain the data xml file name but another file name.
Hence the parser complaining about the file format ... I should have known.


Sorry for the inconvenience. 

Enjoyt your weekend ... I will now,
L@u
The Computing Froggy

----- Message d'origine ----
De : Laurent ROCHE <laurent_roche@yahoo.com>
À : ddlutils-user@db.apache.org
Envoyé le : Samedi, 24 Novembre 2007, 4h40mn 40s
Objet : Can not read data file

Hi,

Now that I can read and load a model, and also export data according to
 the model, I can not read the data file.
I get the following error:
 Digester.fatalError(1558) | 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
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)

Does anyone have any idea of where does this come from ?

Here are the lines reading the data file:
            Platform  platform =
 PlatformFactory.createNewPlatformInstance(dataSource);
            DatabaseDataIO dataIO = new DatabaseDataIO();
            dataIO.setDetermineSchema(true);
            dataIO.setSchemaPattern(XFR_IN_SCHEMA);
            DatabaseIO reader = new DatabaseIO(); 
            reader.setValidateXml(false);
            reader.setUseInternalDtd(true);
            Database model = reader.read(getModelFPN(), XFR_IN_SCHEMA);
            String[] xmlFiles  = {getXfrDir(fileName) };
            dataIO.writeDataToDatabase(platform, model, xmlFiles);

I am obviously doing something wrong ... but I can not see what ! ? !


Any help appreciated.
Cheers,
L@u
The Computing Froggy




    
  _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
 Mail 





      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message