java.sql.SQLException:没有为jdbc找到合适的驱动程序:postgresql:// localhost:5432 / testdb

时间:2015-03-20 10:55:53

标签: java postgresql jdbc

实际上我们没有在某些功能中使用任何数据库池,而且我们使用JDBC连接postgres数据库,目前正在生产系统并且它没有任何问题,但突然间我们遇到了以下错误。

我们的配置很好,因为我们昨天才得到这个错误。

java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/testdb
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)

有谁能猜出我们的生产服务器上发生了什么?

1 个答案:

答案 0 :(得分:0)

您必须下载postgresql驱动程序并将其添加到类路径中。