db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anas Mughal" <anas.mug...@bluenog.com>
Subject RE: Data not written to Oracle
Date Tue, 29 Apr 2008 02:58:57 GMT
Looking thru the source code, I see that the method
DatabaseDataIO::writeDataToDatabase is called from WriteDataToDatabase
class. The implementation of DatabaseDataIO::writeDataToDatabase is:

public void writeDataToDatabase(DataReader dataReader, String path) throws
DdlUtilsException {
        try        {
        catch (Exception ex) { throw new DdlUtilsException(ex); }

The method apparently only reads the data. It does not seem to write
anything to the database. After calling this method, the code has a log
message that reports that data has been written to the database.

This seems to be the implementation of the Ant target writeDataToDatabase.
Could someone please let me know if they have used the Ant target
writeDataToDatabase to actually populate any database with data. I might be
missing something.

Best Regards.
Anas Mughal

-----Original Message-----
From: Anas Mughal [mailto:anas.mughal@bluenog.com] 
Sent: Friday, April 25, 2008 3:17 PM
To: ddlutils-user@db.apache.org
Subject: Data not written to Oracle

I am trying to load data into Oracle using DDLUtils Ant task. The task
reports that the data is successfully written to the database. However, I do
not see any data in Oracle. I don't understand what I am doing wrong! Please




Buildfile: build.xml



[ddlToDatabase] Read schema file C:\etc\schema\phase1-schema.xml

[ddlToDatabase] Read schema file C:\etc\schema\phase2-schema.xml

[ddlToDatabase] Read schema file C:\etc\schema\prefs-schema.xml

[ddlToDatabase] Read schema file C:\etc\schema\registry-schema.xml

[ddlToDatabase] Read schema file C:\etc\schema\security-schema.xml

[ddlToDatabase] Borrowed connection
org.apache.commons.dbcp.PoolableConnection@1ae90c from data source

[ddlToDatabase] Written data from file C:\etc\sql\j2-seed.xml to database



Total time: 2 seconds




Here is my Ant target:




<target name="database-setup"  description="Creates the database structure
and inserts data into the database">


                 <taskdef name="ddlToDatabase"

                              <classpath refid="runtime-classpath"/>



               <ddlToDatabase  databasetype="oracle" verbosity="debug">

                              <database url="${db-url}"



                                             password="${db-password}" />

                              <fileset dir="${db-schema-path}">

name="phase1-schema.xml" />

name="phase2-schema.xml" />

name="phase3ojb-schema.xmll" />

name="prefs-schema.xml" />

name="registry-schema.xml" />

name="security-schema.xml" />


                              <!-- <createDatabase failonerror="false" />

                              <!-- <writeSchemaToDatabase /> --> 










Thank you for help.


Anas Mughal




View raw message