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 14:25:54 UTC
RE : RE : Classpath not found using sql task
Just to allow everyone to know that this solution works :
I've changed the driver from "oracle.jdbc.driver.OracleDriver" (original
classes12.zip) to "oracle.jdbc.OracleDriver" (classes12_817.jar), thanks to
Adam.
These classes are in my ANT_HOME/lib directory.
David
-----Message d'origine-----
De : Adam Rzadkowolski [mailto:adam.rzadkowolski@axit.pl]
Envoyé : mercredi 19 février 2003 11:38
À : Ant Users List
Objet : RE : Classpath not found using sql task
Hi,
please do things as follows:
1. put classes12_817.jar into ANT_HOME\lib
2. set enviroment variables - according to your settings:
set PATH=%PATH%;E:\Ant\bin;
set ANT_HOME=E:\Ant
3. In your build.XML put
<sql driver="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@10.10.10.52:1521:dbmain"
userid="woadm" password="woadm" print="false">
here put some SQL query
</sql>
instead yours <sql.../> section - please change my settings to yours. 4. if
an errors still occurred send me (can be as private email) result as: put
into your build.xml <echoproperties /> - i'm not sure it can be used in
version of ANT<1.5.1
I can suggest to you, try to connect to your database normal - without ${},
if it'll be okay, try to connect via your environment variables ${blablabla}
please send me an error you have got from ant - there should be
something....
regards,
adam
At 11:28 2003-02-19 +0100, you wrote:
>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
> >
>
>---------------------------------------------------------------------
>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