On Tuesday 08 October 2002 22:29, Arul wrote:
> Hi All
>
> I had created a DataSource in Tomcat Admin Console.
> But i am not getting a connection
>
> ds.getConnection()
>
> results in error.
> The error is java.sql.SQLException : cannot load JDBC Driver class null
>
> But while creating the datasource i had given the driverclassname as
> org.gjt.mm.mysql.Driver

You say "name", are you talking about a String name, or the class itself?

> What could be going wrong

If you can load the class explicitly,

        Class c = org.gjt.mm.mysql.Driver.class;

You probably have a security issue.

But the error message is pointing in the more like direction that the class is 
not available to the classloader.

It depends on your Tomcat setup where you should place it.
If you have a "permanent" use of MySQL in your Tomcat applications, you should 
perhaps keep a centralized copy in $TOMCAT_HOME/lib/.
If not, it should be inside the WAR file's WEB-INF/lib/ directory.

Good luck.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to