You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Harding, David" <dh...@Thomcomp.com> on 2000/11/20 17:57:45 UTC

problem with applet and JDBC

tomcat 3.1, mysql 3.23.21, mm.mysql 2.02, freebsd 4.0-RELEASE

we have an applet that tries to connect our database (applet and database
hosted on same machine) using a connection pooling class (a la Core Servlets
and JavaServer Pages by Marty Hall)....problem is that we get a "Connection
failure during handshake" exception message (thrown by mm.mysql) and
*sometimes* a corresponding message in mysql error log that a connection was
aborted due to an error reading communication packets.  a servlet that runs
on the same machine as the database and hosts the applet and uses the same
connection pooling class never fails.  *arrrrg!*

this is an ongoing problem and we are still working on determining if our
network is the problem (very unlikely from what we have seen so far, but
still looking into it).

mysql documentation has a section about this error and states that it could
be due to a couple of things:
    * inactivity on the connection (we have not even connected yet)
    * client exited without calling close() (well this may be where the
error in the mysql log comes from, but is not the source of the problem)
    * bad TCP/IP configuration (problem can be reproduced on any machine)
    * error on read in thread library (well, maybe, but never had a problem
before and ran mysql in "--one-thread" mode and still got the error)
    * router, hub, switch, cable, NIC problem.....hard to diagnose and we
have had no other network problems (network is *very* well used)

i am stumped.  any ideas at all are greatly appreciated.

cheers,
   david j harding