ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vinod.na...@iflexsolutions.com>
Subject Error while executing the database procedure.
Date Fri, 04 Jun 2004 09:00:26 GMT
Hi Stephan,

How to execute database procedures through Ant scripts.
I used both the delimiters [';','/'] but could not succeed.

FYI, Using the delimiter '/' I could compile the procedure through Ant
scripts.

This is the target I used.

<target name="db-procs">
<echo message="Compiling and executing DB procedures."/>
<sql driver="oracle.jdbc.driver.OracleDriver" 
 classpath="${weblogic.home}/lib/classes12.jar"
 
url="jdbc:oracle:thin:@${db-host-ip-address}:${db-host-port-no}:${db-sid
}" 
 userid="${db-user}" password="${db-password}" keepformat="true"
delimiter="/">
	<fileset dir="${DB_HOME}/${db_folder}/db-procs">
	  <include name="**/*.sql"/>
	</fileset>
</sql>
</target>

This is the error display at the console.

/products/proj/pisars/dist/../lib
      [sql] Failed to execute:
      [sql]
      [sql] EXECUTE CHECK_REQ_MASTER;

BUILD FAILED
/products/proj/pisars/dist/build.xml:69: Following error occured while
executing this line
/products/proj/pisars/dist/build.xml:71: Following error occured while
executing this line
/products/proj/pisars/dist/build.xml:533: java.sql.SQLException:
ORA-00900: invalid SQL statement

        at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe
lper.java:537)
        at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:3
42)
        at
net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.ja
va:213)
        at
net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:233)
        at
net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:198)
        at net.sf.antcontrib.logic.For.execute(For.java:153)
        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.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)
--- Nested Exception ---
/products/proj/pisars/dist/build.xml:71: Following error occured while
executing this line
/products/proj/pisars/dist/build.xml:533: java.sql.SQLException:
ORA-00900: invalid SQL statement

        at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe
lper.java:537)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:385)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
        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.taskdefs.Sequential.execute(Sequential.java:65)
        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.taskdefs.MacroInstance.execute(MacroInstance.java:3
40)
        at
net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.ja
va:213)
        at
net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:233)
        at
net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:198)
        at net.sf.antcontrib.logic.For.execute(For.java:153)
        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.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)
--- Nested Exception ---
/products/proj/pisars/dist/build.xml:533: java.sql.SQLException:
ORA-00900: invalid SQL statement

        at
org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:403)
        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.taskdefs.Sequential.execute(Sequential.java:65)
        at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:124)
        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.taskdefs.Ant.execute(Ant.java:383)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
        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.taskdefs.Sequential.execute(Sequential.java:65)
        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.taskdefs.MacroInstance.execute(MacroInstance.java:3
40)
        at
net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.ja
va:213)
        at
net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:233)
        at
net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:198)
        at net.sf.antcontrib.logic.For.execute(For.java:153)
        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.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)
--- Nested Exception ---
java.sql.SQLException: ORA-00900: invalid SQL statement

        at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
        at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
        at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
        at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
        at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
        at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:
1313)
        at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1
232)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.ja
va:1353)
        at
oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
java:1807)
        at
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:563)
        at
org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:504)
        at
org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:475)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec
.java:642)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.jav
a:605)
        at
org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:375)
        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.taskdefs.Sequential.execute(Sequential.java:65)
        at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:124)
        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.taskdefs.Ant.execute(Ant.java:383)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
        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.taskdefs.Sequential.execute(Sequential.java:65)
        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.taskdefs.MacroInstance.execute(MacroInstance.java:3
40)
        at
net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.ja
va:213)
        at
net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:233)
        at
net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:198)
        at net.sf.antcontrib.logic.For.execute(For.java:153)
        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.Main.start(Main.java:147)
	  at org.apache.tools.ant.Main.main(Main.java:230)

Total time: 26 seconds

Thanks & Regards,
Vinod
------------------------------------------------------------
Tel    :  +91-80-57 59 6964
www.iflexsolutions.com


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