Sumit
|
Posted: 01/25/2006, 12:45 AM |
|
I'am getting error as
Database not connectedjava.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver Connection close exception java.lang.NullPointerException
I have written the code as :
<% Connection con = null;
String uname;
String passwd;
try
{
Class.forName("org.gjt.mm.mysql.Driver");
con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/sak/","lm","annuurn");
}
catch(Exception e)
{
out.println("Database not connected" + e);
}
Please suggest, I'am using tomcat web server.
|
|
|
matheus
Posts: 386
|
Posted: 01/25/2006, 2:47 AM |
|
mm-mysql jar in class path.
By the way, this is a forum from Codecharge with Java. Not pure Java.
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
|
|
shravasti
|
Posted: 03/02/2006, 10:18 PM |
|
check the DSN
|
|
|
|