[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
Re: Unidentified subject! (Classnotfound db stuff)
Okay, this may not be the canonical explanation, and I'm mildly in shock after
a very recent motorcycle accident, but....
Do you have something like the following recipe in your code? if not, ya
need every bit of it.
Driver drv = (Driver)Class.forName(driverName).newInstance();
Connection conn =java.sql.DriverManager.getConnection(dbUrl,username,password);
What mystifies me is the need for the Driver line -- I don't understand how
creating a variable that doesn't seem to do anything whatsoever makes the
classloader a happy critter. But without it, you definitely get errors like
the message below.
If that's *not* the problem, I'd be happy to hear what is.
--considerthisanofficialfooterbecauseIcan'trememberwhatI'msupposedtohavehere--
--althoughIcouldgolookinmyemailbacklogbutit'scorporatestandarduglyanywayso..--
On Tue, 3 Oct 2000, Ganesh Sundaram wrote:
> Hi all,
> All test programs (like snoops and date programs) are executing well.
> When I tried to make database connections, the ClassNotFoundExceptions is
> thrown and the following error message is displayed.
>
>
> Exception: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
> java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
> at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:286)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:282)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:243)
> at org.gjt.jsp.JspClassLoader.loadClass(JspClassLoader.java:51)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:243)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at jsp__data_2ejsp._jspService(jsp__data_2ejsp.java:56)
> at org.gjt.jsp.HttpJspPageImpl.service(HttpJspPageImpl.java:75)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:311)
> at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:640)
> at org.gjt.jsp.JspServlet.service(JspServlet.java:284)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:311)
> at
> org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
> at org.apache.jserv.JServConnection.run(JServConnection.java:188)
> at java.lang.Thread.run(Thread.java:475)
>
> GNUJSP: Please report to Administrator. No JSP error page registered.
> =======================
>
> I am not able to proceed further because of it. Can anybody guide
> me.
>
> From,
> Ganesh.
>
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
- References:
- [no subject]
- From: "Ganesh Sundaram" <g_sundaram@hotmail.com>