db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: The tutorial on migrating DB to derby
Date Wed, 14 Jun 2006 20:24:54 GMT
Jean T. Anderson wrote:

>kamna@eng.iastate.edu wrote:
>  
>
>>Hi,
>>I was just going through the tutorial at
>>http://db.apache.org/derby/integrate/db_ddlutils.html
>>
>>    
>>
I am going through this tutorial too today.    I got through the 
tutorial fine but on migrating another db I see the exception below #:(
Perhaps DdlUtils is  calling Clob.getSubString with an invalid length 
value in this case?


EXCEPTION:
SQL Exception: Zero or negative length argument '0' passed in a BLOB or 
CLOB method.

JDBCAPI CALL
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Clob.html#getSubString(long,%20int)

FULL TRACE:
export-source-db:
[databaseToDdl] Written schema to C:\marsden\ddlutils-test\db-schema.xml

BUILD FAILED
C:\marsden\ddlutils-test\build.xml:11: 
org.apache.ddlutils.DynaSqlException: Exception while reading the row 
from the resultset
        at 
org.apache.ddlutils.task.WriteDataToFileCommand.execute(WriteDataToFileCommand.java:88)
        at 
org.apache.ddlutils.task.DatabaseTaskBase.executeCommands(DatabaseTaskBase.java:198)
        at 
org.apache.ddlutils.task.DatabaseTaskBase.execute(DatabaseTaskBase.java:222)
        at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
        at org.apache.tools.ant.Main.runBuild(Main.java:632)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Caused by: org.apache.ddlutils.DynaSqlException: Exception while reading 
the row from the resultset
        at 
org.apache.ddlutils.platform.ModelBasedResultSetIterator.next(ModelBasedResultSetIterator.java:261)
        at org.apache.ddlutils.io.DataWriter.write(DataWriter.java:303)
        at 
org.apache.ddlutils.task.WriteDataToFileCommand.execute(WriteDataToFileCommand.java:82)
        ... 12 more
Caused by: SQL Exception: Zero or negative length argument '0' passed in 
a BLOB or CLOB method.
        at 
org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:80)
        at 
org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
        at 
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:166)
        at 
org.apache.derby.impl.jdbc.EmbedClob.getSubString(EmbedClob.java:206)
        at 
org.apache.ddlutils.platform.PlatformImplBase.extractColumnValue(PlatformImplBase.java:1961)
        at 
org.apache.ddlutils.platform.PlatformImplBase.getObjectFromResultSet(PlatformImplBase.java:1885)
        at 
org.apache.ddlutils.platform.ModelBasedResultSetIterator.next(ModelBasedResultSetIterator.java:251)
        ... 14 more
--- Nested Exception ---
org.apache.ddlutils.DynaSqlException: Exception while reading the row 
from the resultset
        at 
org.apache.ddlutils.platform.ModelBasedResultSetIterator.next(ModelBasedResultSetIterator.java:261)
        at org.apache.ddlutils.io.DataWriter.write(DataWriter.java:303)
        at 
org.apache.ddlutils.task.WriteDataToFileCommand.execute(WriteDataToFileCommand.java:82)
        at 
org.apache.ddlutils.task.DatabaseTaskBase.executeCommands(DatabaseTaskBase.java:198)
        at 
org.apache.ddlutils.task.DatabaseTaskBase.execute(DatabaseTaskBase.java:222)
        at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
        at org.apache.tools.ant.Main.runBuild(Main.java:632)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Caused by: SQL Exception: Zero or negative length argument '0' passed in 
a BLOB or CLOB method.
        at 
org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:80)
        at 
org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
        at 
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:166)
        at 
org.apache.derby.impl.jdbc.EmbedClob.getSubString(EmbedClob.java:206)
        at 
org.apache.ddlutils.platform.PlatformImplBase.extractColumnValue(PlatformImplBase.java:1961)
        at 
org.apache.ddlutils.platform.PlatformImplBase.getObjectFromResultSet(PlatformImplBase.java:1885)
        at 
org.apache.ddlutils.platform.ModelBasedResultSetIterator.next(ModelBasedResultSetIterator.java:251)
        ... 14 more

Total time: 14 seconds
$


Mime
View raw message