ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daisy Guo <Daisy....@quest.com>
Subject RE: <sql task> classes12.jar oracle.jdbc.driver.OracleDriver
Date Tue, 17 Jun 2003 18:39:50 GMT
Change "location" in the following line to "value" should fix it

	<property name="driver" location="oracle.jdbc.driver.OracleDriver"/>
	<property name="url"
location="jdbc:oracle:thin:@[host]:[hostPort]:[instance]"/>
	<property name="userName" location="userName"/>
	<property name="userPassword" location="userPassword"/>

-----Original Message-----
From: Jean-Philippe Pattus [mailto:jppattus@sogitec.fr] 
Sent: Tuesday, June 17, 2003 5:03 AM
To: 'Ant Users List'
Subject: <sql task> classes12.jar oracle.jdbc.driver.OracleDriver



Hello the list,
i'm trying to use the sql task, to execute a sql script against an  oracle
datbase. My problem is ant can't load the driver and i don't know why.

The ant version is 1.5

My buildfile is 

	<property name="driver" location="oracle.jdbc.driver.OracleDriver"/>
	<property name="url"
location="jdbc:oracle:thin:@[host]:[hostPort]:[instance]"/>
	<property name="userName" location="userName"/>
	<property name="userPassword" location="userPassword"/>
		
	<target name="init">
		<sql 	driver="${driver}"
			url="${url}"
			userid="${userName}"
			password="${userPassword}">
			
			<classpath>
				<pathelement
location="D:/Test/classes12.jar"/>
			</classpath>

			select * .....;
		</sql>
	</target>

and the result when i run the ant run with the -debug option is :


init:
      [sql] connecting to
D:\Test\jdbc:oracle:thin:@hostName:Portname:Instance
      [sql] Loading D:\Test\oracle.jdbc.driver.OracleDriver using
AntClassLoader with classpath D:\Test\classes12.jar Finding class
D:\Test\oracle.jdbc.driver.OracleDriver

BUILD FAILED
file:D:/Test/build.xml:20: Class Not Found: JDBC driver
D:\Test\oracle.jdbc.driver.OracleDriver could not be loaded
        at
org.apache.tools.ant.taskdefs.JDBCTask.getDriver(JDBCTask.java:403)
        at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:342)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:358)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)


If someone can help me....

Regards jp
		


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