JDBCExceptionReporter - SQL错误:0,SQLState:08001 [英] JDBCExceptionReporter - SQL Error: 0, SQLState: 08001

查看:2415
本文介绍了JDBCExceptionReporter - SQL错误:0,SQLState:08001的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  JDBCExceptionReporter  -  SQL错误:0,SQLState:08001 
JDBCExceptionReporter - 无法创建与数据库服务器的连接。尝试重新连接3次。放弃。
JDBCExceptionReporter - SQL错误:0,SQLState:08001
JDBCExceptionReporter - 无法创建与数据库服务器的连接。尝试重新连接3次。放弃。

当我尝试通过循环多次连接数据库时,出现上述错误。这是为了正常工作,最多50个请求,但当循环超过50时,出现错误。



正在使用java 1.7和Tomcat 7.0


解决方案

  JDBCExceptionReporter  -  SQL错误:0,SQLState:08001 

这可能出于各种原因:



  1. 在很多情况下,主要问题是连接的限制。
    如果您有交互并且不使用连接池,则可能在数据库中达到了连接限制。


  2. <如果连接数(默认值为100)大于BW作业的数量(默认值为0,表示无限),那么其他情况是在 JDBC

重要提示:通常需要关闭语句或结果集然后重新使用它们。


I did a Java appliction using spring , hibernate and Jaxb.

JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
JDBCExceptionReporter - Could not create connection to database server. Attempted reconnect 3 times. Giving up.
JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
JDBCExceptionReporter - Could not create connection to database server. Attempted reconnect 3 times. Giving up.

I have got the above error when i attempt to connect the database multiple times through loop. It is for working fine up to 50 Requests but getting error's when the looping is more then 50.

Am using java 1.7 and Tomcat 7.0

解决方案

JDBCExceptionReporter - SQL Error: 0, SQLState: 08001 

This might came for various reasons:

  1. In many cases, the main problem is the limitation of connections.
    If you have a interaction and don't use connection pool, probably in the database the limit of connection was reached.

  2. Other situation is, in JDBC palette if the number of connections (default 100) is more than number of BW jobs (default 0 for infinite).

Important: "Generally one needs to close the statement or Resultset before reusing them".

这篇关于JDBCExceptionReporter - SQL错误:0,SQLState:08001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆