ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Adelöw <johan.ade...@corustechnologies.com>
Subject Ant sql task print
Date Tue, 31 Oct 2000 12:38:23 GMT
There must be som kind of bug in the printResults() method in the sql task i
ant.

A simple sql statement that returns a table name and writes it to file (like
below)
 
<sql driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@dogbert:1521:repbld" userid="rep" password="rep"
showheaders="false" print="true"
 output="print.txt"> 
			 select table_name from user_tables where table_name
like '%OGO_DATA%' ;
		</sql>

Results in the following error:


BUILD FAILED

test.xml:11: java.sql.SQLException: ORA-01009: missing mandatory parameter

java.sql.SQLException: ORA-01009: missing mandatory parameter

        at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
        at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
        at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
        at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java)
        at oracle.jdbc.driver.OracleResultSet.next(OracleResultSet.java)
        at
org.apache.tools.ant.taskdefs.SQLExec.printResults(SQLExec.java:539)
        at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:496)
        at
org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:425)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.jav
a:592)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$0(SQLExec.java:589)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:366)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.Project.executeTargets(Project.java:506)
        at org.apache.tools.ant.Main.runBuild(Main.java:420)
        at org.apache.tools.ant.Main.main(Main.java:149)

It seems that when the writing to file is finished the statement
"rs = statement.getResultSet()) != null" 		should be null but
isn't (525) and when doing
"rs.next()"     (539) the program fails.

Does any body konw anything about this? Is the print function of the sql
task tested by anyone?  



*************************************************
  
________________________________________________
 
E-mail: johan.adelow@corustechnologies.com
Direct: +46-8-678 80 60
Mobile: +46-70-563 13 97
Office: +46-8-4403860 (Always open)
Home page: www.corustechnologies.com
_________________________________________________
 


Mime
View raw message