db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <..@Bonn.IZ-Soz.de>
Subject Re: Re: Error: Could not parse or write data file referring to "<writeDataToDatabase datafile="data.xml"/>" - Fri, 26 Jan 2007 08:12:35 GMT
Date Fri, 26 Jan 2007 11:56:49 GMT
Hi Tom

Thanks for your answer:
you wrote on Fri, 26 Jan 2007:

>This is the relevant error: "java.net.MalformedURLException: unknown
>protocol: c".
>Apparently the JDBC url used for inserting the data is wrong, and thus
>DdlUtils cannot access the database. Please check it and see whether
>it matches the one used for the creation of the schema in the

Thanks for this hint, but I think I use the same JDBC url for the
creation of the schema and for inserting the data. Afterwards I tested
by another programme (DBVisualizer) that the new database
"issp_ddlutils_NewDb" has been created successfully with the correct
schema (tables etc.) but naturally without the data. 

Could you please look in the following at my complete "build.xml"
running by Ant. Is there an error in the <database url...> entry? 

<?xml version="1.0" encoding="UTF-8"?>
<project name="MigrateDatabaseToDerby" basedir=".">
   <path id="classpath">
      <fileset dir="./lib">
       	<include name="**/*.jar"/>
   <target name="export-source-db" description="Dumps db structure and
      <taskdef name="databaseToDdl"
         <classpath refid="classpath"/>
      <databaseToDdl modelName="MigrateTest" verbosity="DEBUG"
      	  <database url="jdbc:derby:issp"
         <writeSchemaToFile outputFile="db-schema.xml"/>
      	 <writeDataToFile outputFile="data.xml"
         	encoding="ISO-8859-1" determineschema="true"
	<target name="import-target-db" description="Creates db and
loads data">
	      <taskdef name="ddlToDatabase"
	         <classpath refid="classpath"/>
	      <ddlToDatabase schemaFile="project-schema.xml"
	         <database url="jdbc:derby:issp_ddlutils_NewDb"
	         <createDatabase failonerror="false"/>
	         <writeDataToDatabase datafile="data.xml"
usebatchmode="true" batchsize="1000" failonerror="false"/>

Kind regards

Siegfried Schomisch

Social Science Information Centre
Department Research & Development
Siegfried Schomisch, M.A. 
Lennestr. 30, D-53113 Bonn, Germany
Phone: (+49) 228 2281 168
Fax: (+49) 228 2281 120 
E-mail: sm@bonn.iz-soz.de

View raw message