|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
sounds like the class wasn't installed properlly. This is what I used to get started: http://triton.towson.edu/~schmitt/j...m.doc/book1.htm
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
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 ![]() |
|
#5
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > jdbc driver not found.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|