From what I've read this is a generic error message indicating the JDBC driver's inability to connect to the database. If you search the Internet using the search term "SQL ERROR: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago", you'll find quite a few relevant hits.
One particular hit of note is the post at java - Solving a "communications link failure" with jdbc and mysql - Stack Overflow
, where the poster managed to solve the problem, and helpfully posted a consolidated list of solutions that worked for at least 1 other person who had similar problems. There are quite a few solutions to be tried, so ensure that you approach this systematically. Try one by one (don't take the shortcut to try everything simultaneously), and undo each change before trying the next solution.
Another web page that's worth taking a look is Debugging Communication Link Failure exceptions in Connector/J