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 Using ant to launch Sqlplus scripts
Date Thu, 19 Oct 2000 11:39:46 GMT
I try to use ant to launch a hole bunch of Sqlplus scripts and therefor I've
tried to use another task as a function. In Ant 1.1 I couldn´t use the
nested properties and now when I have changed to the "nightly builds" I get
the following messages. Am I using the exec task in a bad way? (It worked
when I used the command statement in 1.1).

(Sqlplus is in the env. path but not a file at this location) 
(The built in task that uses JDBC can not be used for launching these
scripts since they contain Sqlplus specific syntax)   



<project name="Repbld_linux" default="repbld_linux" basedir=".">
	<target name="dropp_repbld_linux">
		<ant antfile="linux_exec.xml" dir="./" target="exec_sql">
			<property name="exec_mess" value="Create drop
script"/>
			<property name="exec_file"
value="${CORUS_CHECKOUT_DIR}/corus/utv/sql/mkdropall"/>
		</ant>
	</target>
</project>



<?xml version="1.0" encoding="UTF-8"?>
<project name="linux_exec" default="exec_sql" basedir=".">
	<target name="exec_sql">
		<echo message="${exec_mess}"/>
		<exec executable=" echo ${exec_file}: >> ${logfile}"
dir="${exec_dir}./" output="${os_log}" failOnError="true"/>
		<exec executable="sqlplus
${db_user}/${db_passwd}@${database_sid}" dir="./" output="${logfile}"
failOnError="true">
			<arg value="@${execfile}"/>
		</exec>
		<exec executable="cat ${tmplogfile} >> ${logfile}" dir="./"
output="${os_log}" failOnError="true"/>
		<echo message="  "/>
	</target>
</project>


exec_sql:
Create drop script

BUILD FAILED

/home/jad/project/linux_exec.xml:6: Execute failed: java.io.IOException:
sqlplus rep/rep@repbld
: not found
java.io.IOException: sqlplus rep/rep@repbld: not found
        at java.lang.Runtime.exec(Runtime.java)
        at
org.apache.tools.ant.taskdefs.Execute$CommandLauncher.exec(Execute.java:325)
        at
org.apache.tools.ant.taskdefs.Execute$CommandLauncherProxy.exec(Execute.java
:431)
        at
org.apache.tools.ant.taskdefs.Execute$ScriptCommandLauncher.exec(Execute.jav
a:522)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:247)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:213)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:154)
        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.taskdefs.Ant.execute(Ant.java:213)
        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.taskdefs.Ant.execute(Ant.java:213)
        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)
*************************************************
  
Corus ALS is a tool that automates the integration process and allows you to
build, maintain and develop a flexible integration platform that will make
you more successful in the connected economy.
_________________________________________________
 
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
_________________________________________________
 
DISCLAIMER
This message is intended for the exclusive use of the individual or entity
that is the named addressee and may contain information that is privileged
or confidential or otherwise legally exempt from disclosure. If you are not
the named addressee or an employee or agent responsible for delivering this
message to the named addressee, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. If you have
received this message in error, please notify us immediately by e-mail. 


Mime
View raw message