ant-user mailing list archives

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

SQL Statements are correct. After compiling the procedure through Ant
scripts, I executed the same procedure through SQLPlus prompt
successfully.

After seeing the ANT class, SQLExec, it seems to me that, all the SQL
statements are executed through statement.execute(SQL-String); where in
my case 'SQL-String' is, 'execute CHECK_REQ_MASTER'.

Regards,
Vinod.

-----Original Message-----
From: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com] 
Sent: Friday, June 04, 2004 2:42 PM
To: Ant Users List
Subject: Re: Error while executing the database procedure.

Vinod
ORA-00900 stands for an invalid SQL statement. Are you
sure your SQL statements are correct. Can you execute
your SQL scripts via SQLPlus?

Ivan
--- vinod.nayak@iflexsolutions.com wrote:
> 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)
> 
=== message truncated ===



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


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


Mime
View raw message