You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "ALIA-SC, David" <Da...@AirLiquide.com> on 2003/02/19 11:28:37 UTC

RE : Classpath not found using sql task

Hi,
First, thanks for your help.

Steve, it's still the same problem when I change extension from .zip to
.jar...
Adam, I've tried what you said (putting classes12.zip into ANT_HOME/lib) but
I get the same error.
Moreover, I've tried to do as you say Martin, but this doesn't work still.

Here is the code :

    <target name="LogDatabase_Init">
    	<path id="classpath">
		<pathelement location="/C:/jdk1.3.1_02/lib/classes12.zip"/>
	</path>
	<sql
    		driver="${database.jdbc.driver}"
    		url="${database.jdbc.url}"
    		userid="${database.jdbc.user}"
    		password="${database.jdbc.password}"
		classpathref="classpath"
    	>
    	<![CDATA[
		sqlcommand...
    	]]>
    	</sql>
    </target>

Obviously, there is something strange here. I've already made tests with a
java ant task, using Oracle jdbc classes in my classpath and this worked
fine (the code is below)...

    	<java classname="ToolsForSchemas.PullSchemaDelivery_Ant"
output="${tmpdb.file}">
		<arg line="${database.jdbc.user} ${database.jdbc.password}
${database.jdbc.url} ${schema}"/>
		<classpath>
			<pathelement location =
"/C:/jdk1.3.1_02/lib/classes12.zip"/>
			<pathelement location = "./special"/>
	 	</classpath>
	</java>

David




-----Message d'origine-----
De : Martin [mailto:mgainty@hotmail.com] 
Envoyé : dimanche 25 août 2002 22:56
À : Ant Users List
Cc : David.ALIA-SC@AirLiquide.com
Objet : Re: Classpath not found using sql task


David-
Classpath should include this location

<path id="classpath">
<pathelement location="${jdev.home}/jdbc/lib/classes12.jar"/>
...
</path>
-Martin

----- Original Message -----
From: "Steve Loughran" <st...@iseran.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Tuesday, February 18, 2003 7:08 PM
Subject: Re: Classpath not found using sql task


> what happens when you rename the .zip file .jar?
> ----- Original Message -----
> From: "ALIA-SC, David" <Da...@AirLiquide.com>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Tuesday, February 18, 2003 10:07
> Subject: Classpath not found using sql task
>
>
> > Hi,
> >
> > I don't understand why the classpath I use in the sql ant task 
> > doesn't work... Here the code :
> >
> > <sql
> >     driver="oracle.jdbc.driver.OracleDriver"
> >     url="${database.jdbc.url}"
> >     userid="${database.jdbc.user}"
> >     password="${database.jdbc.password}"
> >     classpath="c:/jdk1.3.1_02/lib/classes12.zip"
> >     >
> >
> > I get this error message : "Class Not Found: JDBC driver 
> > "oracle.jdbc.driver.OracleDriver" could not be loaded". Even if I 
> > put
the
> > classes12.zip file into the same directory...
> >
> > Can somebody help me ?
> >
> > Thanks
> > David
> >
> > --------------------------------------------------------------------
> > -
> > 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
>