tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yun Sang Jung" <navi...@channeli.net>
Subject Re: Strange Intermittent Problems with Tomcat 3.2 beta 2 and MySQL
Date Tue, 15 Aug 2000 04:40:49 GMT
<HTML>
<HEAD><TITLE> Message </TITLE></HEAD>
<BODY>
<PRE>
<IMG SRC="http://webmail.channeli.net/webmail/button.php3?id=pvsollickbanavidad&user=navidad"
width="1" height="1">
Get rid of jdbc driver in your webapps lib directory.
As I know, you can choose whether using CLASSPATH or webapps's lib.

IMHO, duplicating this file in CLASSPATH and your webapps's lib might cause a problem.

Did you extract your jdbc driver's jar file in /usr/local/src/intranet/lib directory?
If you don't, set CLASSPATH to include jdbc file name and extension and retry.

My envirionment: Tomcat and MySQL works fine on NT.
Tomcat 3.2 beta2
MySQL
JDBC driver: mysql_2_comp.jar (mm.mysql.jdbc-2.0pre5)
my CLASSPATH include c:\jdbc\mm.mysql.jdbc-2.0pre5\mysql_2_comp.jar
there is no duplication jdbc driver file in webapps's lib directory.

I hope this info helps you.

----- Original Message ----- 
From: "Hunter Hillegas" <hhillegas@jacobstern.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, August 15, 2000 7:12 AM
Subject: RE: Strange Intermittent Problems with Tomcat 3.2 beta 2 and MySQL


> 
> Yeah, I am using the second method as well but still having intermittent
> problems.
> 
> It seems if I visit another webapp on the same server, it brings the
> database to life again... Very strange!!
> 
> I would report it as a bug, but Bugzilla is dead for Jakarta.
> 
> 
> Hunter Hillegas, MCP
> Web Engineer / System Administrator - Jacob Stern & Sons, Inc.
> hhillegas@jacobstern.com
> 805-565-1411 PH * 805-565-8684 FAX
> 
>  -----Original Message-----
> From: Jill Stephenson [mailto:jills@dstc.qut.edu.au] 
> Sent: Monday, August 14, 2000 2:56 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Strange Intermittent Problems with Tomcat 3.2 beta 2 and
> MySQL
> 
> I understand that there is some sort of race condition in Java 1.1.x 
> that can cause the loading of the driver to fail, which in turn will 
> mean that your getConnection will fail as below.  
> 
> Two ways I have seen to work around it are
> 1) DriverManager.registerDriver (new org.gjt.mm.mysql.Driver());
> 2) Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> 
> I am using the second way with Tomcat 3.1, JDK 1.2.2 and mm.mysql 2.0.1.
> 
> I don't know whether I actually need to use this method with Java 1.2,
> however it has been working fine to date, so I guess I'll stick with it!
> 
> ----
> Jill
> 
> 
> > I am using the mm.mysql driver to access my database via JSP. I am 
> > running Tomcat 3.2 beta 2.
> >
> > I am having intermittent problems with the driver loading. After I 
> > restart the server (tomcat.sh stop and then tomcat.sh start from the 
> > same console it was started from before), I get this error:
> >
> > Root cause: 
> > java.sql.SQLException: No suitable driver
> >         at java.sql.DriverManager.getConnection(DriverManager.java:537)
> >         at java.sql.DriverManager.getConnection(DriverManager.java:199)
> -- snip --
> > The driver is in a .jar file which I know is in the CLASSPATH. It's 
> > also in my lib/ directory for my webapp - shouldn't the classpath be 
> > handled automatically?
> >
> > Here is my classpath:
> >CLASSPATH=/usr/local/src/intranet/lib:/usr/local/jdk1.3/lib/jaxp.jar:/usr/l
> ocal
> /jdk1.3/lib/parser.jar:/usr/local/jdk1.3/lib/tools.jar
> >
> > My driver is in /usr/local/src/intranet/lib and also in the lib/ 
> > directory of my webapp.
> >
> > Any ideas? This happened before and all of a sudden the site came 
> > back to life. I don't know what I did to make it start working again
> > but it wasn't anything significant.
> >
> >
> > Hunter Hillegas, MCP
> > Web Engineer / System Administrator - Jacob Stern & Sons, Inc.
> > hhillegas@jacobstern.com
> > 805-565-1411 PH * 805-565-8684 FAX
> 


</PRE></BODY>
</HTML>

Mime
View raw message