ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RPea...@360commerce.com
Subject Re: Newbie: <sql> task and executing an Oracle Stored Procedure
Date Fri, 13 Aug 2004 16:28:42 GMT
Have you tried executing Ant with -v? Maybe that will give you more data.

Robert





Richard Grey <haamdab@haamdhani.com> 
08/13/2004 11:19 AM
Please respond to
"Ant Users List" <user@ant.apache.org>


To
user@ant.apache.org
cc

Subject
Newbie: <sql> task and executing an Oracle Stored Procedure






Why can't I use the <sql> task to exec an Oracle stored procedure ?

<target name="test">
  <sql driver="${db.driver}" 
       url="${db.url}" 
       userid="${db.user}" 
       password="${db.pwd}" 
       classpath="${profileLibPath}/ojdbc14.jar"
       print="true"
       showheaders="true">

                 exec myStoredProc(1);

  </sql>
</target>

All my driver settings etc are correct, in that I can replace the exec SQL 
above with a simple select * from table type SQL command.

But, running the above task as is, gives me the following error. And yes, 
I am using 1.5.1 (for a reason).

--

Apache Ant version 1.5.1 compiled on October 2 2002
Buildfile: build.xml
test:
      [sql] connecting to jdbc:oracle:thin:@boreas:1555:prodevel
      [sql] Loading oracle.jdbc.driver.OracleDriver using AntClassLoader 
with classpath classpath C:\build\lib\ojdbc14.jar
      [sql] Executing commands
      [sql] SQL: exec myStoredProc(1);
      [sql] Failed to execute: exec myStoredProc(1)

BUILD FAILED
file:C:/Profile5/build_borland/build.xml:524: java.sql.SQLException: 
ORA-00900: invalid SQL statement

        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:406)

etc

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message