This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all, I am using MySQL as a db with Tomcat 3.2.1. Until a few days ago, I had no problems creating connections to the db. All of a sudden it seems that I get this SQL Exception from the MySQL driver:
java.sql.SQLException: Communication link failure: Bad handshake at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java) at org.gjt.mm.mysql.Connection.<init>(Connection.java) at org.gjt.mm.mysql.Driver.connect(Driver.java) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:177)
The passwords, url, username are all correct. I have no clue what this could mean, or what is causing it. Any help would be appreciated.
from here it says "There was a security bug in the handshake (more precise: in the password challenge) which was fixed after 3.22.26a. The JDBC driver had to be fixed, too, because it indirectly relied on that bug. So just upgrade your JDBC driver, too." I also read a few things that say an unsigned applet might throw this exception or a connection timeout, but nothing concrete to support this. Jamie
Originally posted by Ronald Whalen: I downloaded the newest version of the MM MySQL driver (2.14 I believe) and started using it. I collected all other MySQL drivers on my machine and deleted them.
This is a separate but related question: Is it possible to somehow get the DriverManager or another class identify the exact path of the driver it is actually using? Thanks Ronald Whalen
Sorry for the delayed reply, I missed your response. What your looking for is found in the DatabaseMetaData interface. Some methods that might interest you are getURL(), getDriverMajorVersion(), getDriverMinorVersion() getDriverName(), getDriverVersion(). Combined they might help you identify the driver.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com