db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean T. Anderson" <...@bristowhill.com>
Subject Re: Not much info with: "Could not parse or write data file"
Date Wed, 13 Dec 2006 16:51:06 GMT
Laurent ROCHE wrote:
> Hi,
> 
> I am exporting a database from PostgreSQL into Derby, using the ant tasks.
> 
> The schema has been generated OK.
> So it seems, anyway: I had the following messages:
> [ddlToDatabase] INFO: Executed 190 SQL command(s) with 0 error(s)
> [ddlToDatabase] Written schema to database
> 
> But then the data import (I guess) fails with the following messages:
> BUILD FAILED
> C:\apps\Ddlutils-test\build.xml:35: Could not parse or write data file C:\apps\Ddlutils-test\data.xml

Does that data.xml file actually exist in C:\apps\Ddlutils-test\data.xml ?

> It will be nice to get an  line number where the import fails and also the SQL error
(as I suppose, it fails because of some SQL problems).
> Like this it makes it really hard to know what's going wrong ... particularly considering
the data are exported from an identical PG db (so there should be no problems).

If a SQL error is involved, a message might have been written to the
Derby log file. Assuming that you created the Derby database in
C:\apps\Ddlutils-test, check C:\apps\Ddlutils-test\derby.log.

Does the Derby schema "make sense"?  After creating the schema in Derby
you can check it with this Derby command ('dbname' is the name of your
database and this assumes you're executing this command in
C:\apps\Ddlutils-test):

java org.apache.derby.tools.dblook -d jdbc:derby:dbname -o dbname.sql

These database locations and urls assume you're using the embedded jdbc
driver and that the database was created in C:\apps\Ddlutils-test.
Otherwise you can give it the full path to the database [1]:

   jdbc:derby:C:/Full/Path/to/Databases/dbname

the URL would need to be tweaked for the client jdbc driver.[2]

 -jean

[1] http://wiki.apache.org/db-derby/DatabaseNamesRelativeAbsolute
[2] http://db.apache.org/derby/docs/10.2/adminguide/cadminappsclient.html

> 
> 
> Have fun,
> L@u
> The Travelling Froggy
> TravellingFroggy.info
> 
> 
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________________________ 
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
> Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo!
Questions/Réponses 
> http://fr.answers.yahoo.com


Mime
View raw message