I've changed the driver to com.mysql.jdbc.Driver.  Which jdbc jar file
is this?
The one that I have is mysql-connector-java-3.0.11-bin.

I only have one server.xml (newbie.. so don't have many apps).
This file is located under $CATALINA_HOME/conf.  Should it be somewhere
else?

Also, what should my docBase be?
I'm using Win2K OS.  My WEB-INF directory is under
$CATALINA_HOME/webapps/ROOT.
That's why I have my docBase as ROOT.

Still the same exception.

Thnx,
--Kawthar

>>> [EMAIL PROTECTED] 18/03/2004 12:29:21 PM >>>
I was able to find it, and it is a little involved.  Basically on my
system
the issue was the context wasn't being read or involked correctly.  I
exchanged the server.xml with the server-minimum.xml and found that
either
placing the context in the Host tag or better yet in 
/usr/local/tomcat/conf/Catalina/localhost/DBTest.xml
Worked.

I went with the separate file, that way all my webapps have separate
files
and I am not cluttering up the server.xml

Once I did this.  I was A-OK.
If you are using MYSQL make sure your class name isn't
Org.gjt.mm.mysql....
According to the docs for mysql that is there only for compatibility. 
Use
com.mysql.jdbc.Driver

Also make sure your jdbc jar file is in 
/usr/local/tomcat/common/lib/  or where ever your tomcat resides make
sure
it is in the common/lib sub directory.

Everything is working great for me now.... 

If that doesn't help let me know.

Steve

-----Original Message-----
From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 16, 2004 11:01 AM
To: 'Tomcat Users List'
Subject: RE: JDBC problems with MySQL
Importance: High

Dear Steve,

I posted this problem around 3 months back and I am daily reading the
forum,
hoping that one day somebody will give a solution.
I will deeply appreciate you if u share the solution with me if u r
able to
find.

Good Luck 

Best Regards
Abhay Kumar


-----Original Message-----
From: Steve Gums [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 16, 2004 11:57 AM
To: [EMAIL PROTECTED] 
Subject: JDBC problems with MySQL


Users

            I know there has been a bazillion messages about this.  I
searched the archives and couldn't find anything to solve my extremely
annoying issue.  It has to be something really simple but I just can't
find
it.

 

My System:

            Solaris 9

            Tomcat 5.0.19

            MySQL 4.0.18

            Connector J 3.0.11

 

I have the connector J jar in the /usr/local/tomcat/common/lib dir.

I have basically copied the HOW-TO located at.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how

to.html

 

and my result is this.


Results


Foo Not Connected
Bar -1

 

I have tried everything I can think of.  I verified the database and
the
user/password combo.  Works good.  I even created a simple Java app
that
connects and performs queries, which worked.  That would indicate
everything
is cool with the Connector J.  I have verified that the jdbc/TestDB is
in
the context and it is.  As best I can tell ds (DataSource) is coming
back
not null, but the call to getConnection is failing.  I created a little
more
verbose web app and get the following message.

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
class '' for connect URL 'null', cause: No suitable driver

 

This has to be something simple, because this works fine on my old
machine.
I know I am forgetting some small step that I did the first time and
failed
to do again.  Trust me I have checked the configs about a million
times, and
can't find any differences.   Any help would be appreciated.

 

Sorry to be so vague here, but this is really simple. I don't know what
else
to include for info.

 

Steve Gums

[EMAIL PROTECTED] 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 

Confidential information may be contained in this e-mail and any files transmitted 
with it ('Message'). If you are not the addressee indicated in this Message (or 
responsible for delivery of this Message to such person), you are hereby notified that 
any dissemination, distribution, printing or copying of this Message or any part 
thereof is strictly prohibited. In such a case, you should delete this Message 
immediately and advise the sender by return e-mail. Opinions, conclusions and other 
information in this Message that do not relate to the official business of Maxis shall 
be understood as neither given nor endorsed by Maxis.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to