#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    1
    Rep Power
    0

    Angry jdbc driver not found..


    I get this msg when i run my jsp code. I had a big discussion with my hosting service people. They are not understanding. I know this means that the class cant be referenced where do you think the problem is? Anyone... i attached my code below. Thanx..

    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    <--------code----------->
    <html>
    <!--Importing the Packages-->
    <%@ page import = "java.sql.*" %>

    <body>
    <%
    Class.forName("com.mysql.jdbc.Driver").newInstance();

    java.sql.Connection conn;

    conn = DriverManager.getConnection(
    "jdbc:mysql://localhost/mgandha_data?user=mgandha_mgandha&password=mariog");
    %>

    </body>
    </html>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    259
    Rep Power
    13
    sounds like the class wasn't installed properlly. This is what I used to get started: http://triton.towson.edu/~schmitt/ja....doc/book1.htm
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    1
    Rep Power
    0

    Thank You...


    Yeah I thought so they think its not though... well its not exactly mm.mysql.. i think they installed a newer version called connector/j.... or something... so thanks for the help though.
  6. #4
  7. No Profile Picture
    Cthulu-ish
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Seattle
    Posts
    31
    Rep Power
    12
    I just installed connector/j and the jdbc string for it is different it's "com.mysql.jdbc.Driver"

    that and make sure your jar file is in the right spot
  8. #5
  9. No Profile Picture
    Database Expert
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    20
    Rep Power
    0
    This is likely a classpath problem. Make sure the jar file, mysql-connector-java-2.0.14-bin.jar, is accessible to the JSP page compiler. This could be the server or a standalone translator.

    If you are using the Tomcat server in a Windows operating environment, you can drop this file into c:\tomcat\common\lib.

IMN logo majestic logo threadwatch logo seochat tools logo