Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Solaris 9, apache-2.2.15, Sun JDK 1.6.0, Sybase 12.5.3, ant 1.8.1 ,subversion-1.6.9, jconnect 5.5, db driver: com.sybase.jdbc2.jdbc.SybDriver
Description
Utilizing the ant task as described on the Apache site to export structure and data from a sybase db, the build fails as shown below:
Apache Ant version 1.8.1 compiled on April 30 2010
Trying the default build file: build.xml
Buildfile: /scratch/DdlUtils-test/build.xml
Detected Java version: 1.6 in: /scratch/usr/jdk/instances/jdk1.6.0_20/jre
Detected OS: SunOS
parsing buildfile /scratch/DdlUtils-test/build.xml with URI = file:/scratch/DdlUtils-test/build.xml
Project base dir set to: /scratch/DdlUtils-test
parsing buildfile jar:file:/local/src/apache-ant-1.8.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/local/src/apache-ant-1.8.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `export-source-db' is [export-source-db]
Complete build sequence is [export-source-db, ]
export-source-db:
BUILD FAILED
/scratch/DdlUtils-test/build.xml:17: Could not read the schema from the specified database: java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0.
at org.apache.ddlutils.task.DatabaseToDdlTask.readModel(DatabaseToDdlTask.java:308)
at org.apache.ddlutils.task.DatabaseTaskBase.execute(DatabaseTaskBase.java:381)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: org.apache.ddlutils.DatabaseOperationException: java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0.
at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:2808)
at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:2781)
at org.apache.ddlutils.task.DatabaseToDdlTask.readModel(DatabaseToDdlTask.java:265)
... 18 more
Caused by: java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:487)
at com.sybase.jdbc2.tds.TdsParam.prepareForSend(TdsParam.java:107)
at com.sybase.jdbc2.jdbc.ParamManager.checkParams(ParamManager.java:646)
at com.sybase.jdbc2.tds.Tds.language(Tds.java:674)
at com.sybase.jdbc2.jdbc.SybStatement.sendQuery(SybStatement.java:1424)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.sendQuery(SybPreparedStatement.java:1025)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1494)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:70)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.apache.ddlutils.platform.sybase.SybaseModelReader.readForeignKeys(SybaseModelReader.java:197)
at org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcModelReader.java:595)
at org.apache.ddlutils.platform.sybase.SybaseModelReader.readTable(SybaseModelReader.java:87)
at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:548)
at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:504)
at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:2797)
... 20 more
Total time: 11 seconds