ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Izem" <farid.i...@gmail.com>
Subject Question about Classpath
Date Fri, 19 Jan 2007 22:38:50 GMT
Hi all,

I'm new to ant and i d'like to make a connexion to a mysql database.
To do that, i hava done the following scripts :


<project basedir="/projets/ESE/esepro02" default="mysql">

        <description>
                main project with many futures
        </description>

        <path id="projet.classpath">
            <pathelement location="classes/" />
            <pathelement location="lib/" />
        </path>


        <target name="mysql">
                <sql
                        driver="com.mysql.jdbc.Driver"
                        url="jdbc:mysql//localhost:3306/BROWSE"
                        userid="XXXXX"
                        password="YYYYY"
                ><![CDATA[
                        show tables;
                ]]>
                </sql>
        </target>

</project>

But, i get the following error :

mysql:

BUILD FAILED
/LNXVOL01/projets/ESE/esepro02/build2.xml:19: Class Not Found: JDBC driver
com.mysql.jdbc.Driver could not be loaded

I try adding <classpath refid="projet.classpath" /> in the mysql task
without success, i get the following error :

Buildfile: build2.xml

mysql:

BUILD FAILED
/LNXVOL01/projets/ESE/esepro02/build2.xml:14: Problem: failed to create task
or type classpath
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Can anyone help solving this issue with the classpath element.

I'm using ant 1.7.0 and JVM 1.5.0_10-b03



Kind Regards,

Farid

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message