tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knight, Digby" <>
Subject BindException connecting to MySQL with a Tomcat DataSource
Date Fri, 25 Apr 2003 08:44:32 GMT

Just wondering if anyone has come across a BindException when trying to
connect to MySQL (3.2 or 4.0) using a DataSource resource set up in

I can connect quite happily doing a normal Class.forName(...);
DriverManager.getConnection(...),  and I can also get the reference to the
DataSource okay - it just fails when I do the dataSource.getConnection,
giving me the following exception:

"java.sql.SQLException: Unable to connect to any hosts due to exception: Address already in use: connect" 

The stack trace seems to indicate that it's failing somewhere in the DBCP

The odd thing is that I've been connecting quite happily with this method
for months and it's suddenly stopped working, although I'm not sure what I
had just done when it happened - it may have been upgrading to Tomcat
4.1.24, so I might try installing an earlier version. Seems unlikely that
this hasn't been spotted by anyone else though.

Could it be the MySQL Connector/J JDBC driver? I was using the older mm
driver a while ago, although again I can't remember whether that coincided
with the connection failing.

Anyone got any ideas? It's driving me mad.

Thanks in advance.


The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message