mysql driver class not found

xiaoyu
2006-02-13
2013-06-03
  • xiaoyu

    xiaoyu - 2006-02-13

    hi,
    I try to use datavision for my project.
    my database is mysql.
    these are the steps i used to start datavision as follow instruction in user manual:-
    1)install java 2 platform, enteprise edition 1.4 sdk.
    2)install mysql jdbc driver :mysql-connector-java-3.1.12-bin.jar,  by adding mysql-connector-java-3.1.12-bin.jar to classpath in environment variables ( i hope this is the correct way)
    3)install datavision1.0.0 by editing mysql-connector-java-3.1.12-bin.jar to datavision.bat ( i hope this is the correct way)
    4)launch datavison n a database connection screen pop out.
    5)i enter the info as below :
        JDBC driver class name : com.mysql.jdbc.Driver
    Connection info string  :jdbc:mysql://localhost/ling
    Database name : ling   
    Database user name : root
    Database password:sa
      

    but it give me class name com.mysql.jdbc.Driver not found.
    did i miss any things in the steps above?
    Kindly advice

    Thanks and hava a nice day

     
    • Jim Menard

      Jim Menard - 2006-02-13

      As I mentioned in my reply to the email you sent me, I don't think you missed anything. Try printing out the classpath in datavision.bat just before it executes DataVision, to see if the classpath looks correct to you.

      Also, make sure that the driver class name is correct by reading your driver's documentation.

      You can try using the ConnectionTest program in the examples directory to test your connection information. See that program's Javadoc comments for details. See also the Ant task "conntest", which requires that you define the property "cmdline" as described in build.xml.

       
    • xiaoyu

      xiaoyu - 2006-02-14

      hi jimm,
      i couldnt find ConnectionTest program in the examples directory and Ant task 'conntest'.
      where is located?

      Thanks

       
      • Jim Menard

        Jim Menard - 2006-02-14

        ConnectionTest.java is right there in the examples directory. The conntest target is in build.xml. Type

        ant -Dcmdline="-d your_driver -c your_conninfo" conntest

        to compile and run it.

         
    • xiaoyu

      xiaoyu - 2006-02-14

      hi Jimm,
      below is my datavison.bat with mysql driver added :-

      set CLASSPATH=%CLASSPATH%;lib\DataVision.jar;lib\jcalendar.jar;lib\jruby.jar;lib\iText.jar;lib\bsf.jar;C:\Program Files\MySQLJConnector\mysql-connector-java-3.1.12\mysql-connector-java-3.1.12-bin.jar

      java -classpath %CLASSPATH% jimm.datavision.DataVision %1 %2 %3 %4 %5 %6 %7 %8 %9

      does it look fine?

       
    • Jim Menard

      Jim Menard - 2006-02-14

      The space in "Program Files" might be causing the problem. Put quotes around that whole path element, like this:

      set CLASSPATH=%CLASSPATH%;lib\DataVision.jar;lib\jcalendar.jar;lib\jruby.jar;lib\iText.jar;lib\bsf.jar;"C:\Program Files\MySQLJConnector\mysql-connector-java-3.1.12\mysql-connector-java-3.1.12-bin.jar"

      You might also need quotes around "%CLASSPATH%", or you can probably just remove it completely.

       
    • xiaoyu

      xiaoyu - 2006-02-14

      Hi Jimm,

      Thanks for your help, i managed to connected it finally.

      Thanks and have a nice day

      Regards,
      Ling

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks