dbcp 连接 postgresql 报org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int)
来源:互联网 发布:md5加密java代码 密钥 编辑:程序博客网 时间:2024/06/06 08:27
Caused by: org.postgresql.util.PSQLException: 这个 org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) 方法尚未被实作。
at org.postgresql.Driver.notImplemented(Driver.java:753)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setQueryTimeout(AbstractJdbc2Statement.java:656)
at org.apache.commons.dbcp.DelegatingStatement.setQueryTimeout(DelegatingStatement.java:249)
at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:656)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1558)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
at org.postgresql.Driver.notImplemented(Driver.java:753)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setQueryTimeout(AbstractJdbc2Statement.java:656)
at org.apache.commons.dbcp.DelegatingStatement.setQueryTimeout(DelegatingStatement.java:249)
at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:656)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1558)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 59 more
查看org.postgresql.jdbc2.AbstractJdbc2Statement.setQueryTimeout发现seconds设置问题
public void setQueryTimeout(int seconds) throws SQLException
{
checkClosed();
if (seconds < 0)
throw new PSQLException(GT.tr("Query timeout must be a value greater than or equals to 0."),
PSQLState.INVALID_PARAMETER_VALUE);
if (seconds > 0)
throw Driver.notImplemented(this.getClass(), "setQueryTimeout(int)");
timeout = seconds;
}
解决办法是去除配置文件配置项
<property name="validationQueryTimeout">
<value>1</value>
</property>
0 0
- dbcp 连接 postgresql 报org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int)
- NodeJS连接PostgreSQL报错TCP.onRead
- 解决postgresql远程连接报错
- postgreSQL
- PostgreSQL
- PostgreSQL
- postgresql
- postgresql
- PostgreSQL
- PostgreSQL
- PostgreSQL
- PostgreSQL
- PostgreSQL
- PostgreSQL
- PostGresql
- PostgreSQL
- PostgreSQL
- postGreSql
- JAVA学习笔记10——static+this
- poj 2164 (卷包裹算法)
- 总结2014——迷茫以及迷茫过后的坚持
- 算法导论第16章 贪心算法-活动选择问题
- HTML上划线 中划线 下划线实现
- dbcp 连接 postgresql 报org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int)
- mac下搭建openfire
- Robotium 专题(四): Robotium 中部分常用的方法集锦
- linux0.11源代码在gcc4.3.x gcc4.4.x下编译bochs下模拟
- 算法导论第16章 贪心算法-0-1背包问题—动态规划求解
- winnt.h(287): error C2059: 语法错误:“;”
- cookie, sessionStorage and localStorage 之间的区别 与定义; 应用;
- 用GDB调试多线程程序
- Dom方式解析Xml