A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Getting exception while loading
Joined: Mar 08, 2007
Mar 27, 2007 01:24:00
Iam using MySql and while using eclipse and tried to load driver with the statement,
iam getting the exception
i transferred my code to Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
but again iam getting exception as
When i use the second code in notepad it is working.Could anybody help me.
Thanks in advance
Joined: Apr 14, 2004
Mar 27, 2007 02:10:00
You need to make sure the driver is in your classpath. Where have you put the MySQL driver jar file?
Joined: Nov 29, 2005
Mar 27, 2007 04:11:00
Not able to find the class / jar containing the class in the classpath.Look into the scope of the classloader , which is trying to load the class.If its within a webapplication then put the jar in application/WEB-INF/lib folder.
I agree. Here's the link:
subject: Getting exception while loading
getting re-read error
Issues regarding Connectionpooling with MySQL database server and Tomcat 5.5 server
Multiple loading of a class thru Class.forName() ??
Exception at JNDI
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014