java中的常见异常

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
发生这个错误的原因是数据库服务已经关闭,也可能是第三方的数据库不允许直接访问。

你可能感兴趣的:(java)