CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 JDBC Exception in JSP

Print topic Send  topic

Author Message
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
View profile  Send private message
shravasti
Posted: 03/02/2006, 10:18 PM

check the DSN

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.