You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Richard Grey <ha...@haamdhani.com> on 2004/08/13 18:19:40 UTC

Newbie: 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


Re: Newbie: task and executing an Oracle Stored Procedure

Posted by RP...@360commerce.com.
Have you tried executing Ant with -v? Maybe that will give you more data.

Robert





Richard Grey <ha...@haamdhani.com> 
08/13/2004 11:19 AM
Please respond to
"Ant Users List" <us...@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