db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Westermarck <fredrik.westerma...@mdh.se>
Subject The writeSchemaSqlToFile Anttask fails
Date Tue, 06 Dec 2005 19:38:30 GMT
Hi!

I have been trying to generate a DDL file from a XML file from within 
ant without succeeding. I'm using ddlutils with SVN rev 354492.

I my build.xml I have the following:
<target name="create.sql">
     <ddlToDatabase schemaFile="test.xml" databaseType="oracle">
       <writeSchemaSqlToFile doDrops="true"
                             failOnError="true"
                             outputFile="test.ddl"/>
     </ddlToDatabase>
   </target>

The XML file that describes the database for which to generate SQL 
statements looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>

<database name="test" version="1.0">
   <table name="test">
     <column name="code"
             type="VARCHAR"
             size="20"
             primaryKey="true"
             required="true"/>
     <column name="name"
             type="VARCHAR"
             size="40"
             required="true"/>
   </table>
</database>

When I run the ant task, it fails with the following message:

create.sql:
[ddlToDatabase] 2005-dec-06 20:24:11 
org.apache.commons.betwixt.expression.Context popOptions
[ddlToDatabase] INFO: Cannot pop options off empty stack
[ddlToDatabase] 2005-dec-06 20:24:11 
org.apache.commons.betwixt.expression.Context popOptions
[ddlToDatabase] INFO: Cannot pop options off empty stack
[ddlToDatabase] 2005-dec-06 20:24:11 
org.apache.commons.betwixt.expression.Context popOptions
[ddlToDatabase] INFO: Cannot pop options off empty stack
[ddlToDatabase] 2005-dec-06 20:24:11 
org.apache.commons.betwixt.expression.Context popOptions
[ddlToDatabase] INFO: Cannot pop options off empty stack
[ddlToDatabase] 2005-dec-06 20:24:11 
org.apache.commons.betwixt.expression.Context popOptions
[ddlToDatabase] INFO: Cannot pop options off empty stack
[ddlToDatabase] Read schema file D:\mdh\ddlutilstest\test.xml

BUILD FAILED
D:\code\ddlutilstest\build.xml:18: No database specified.

The error message indicates that I have not configured a DataSource, 
which is correct, but as far as I can tell the task 
'writeSchemaSqlToFile' does not require a DataSource.

Any help with this matter would be greatly appreciated.

-- 
Regards,
Fredrik Westermarck

Mime
View raw message