java JDBCExceptionReporter - SQL 错误:0,SQLState:08001
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15813522/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
提问by kumar
I did a Java appliction using spring , hibernate and Jaxb.
我使用 spring 、 hibernate 和 Jaxb 做了一个 Java 应用程序。
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.
当我尝试通过循环多次连接数据库时,出现上述错误。它适用于最多 50 个请求,但在循环超过 50 个时出现错误。
Am using java 1.7 and Tomcat 7.0
正在使用 java 1.7 和 Tomcat 7.0
回答by Shreyos Adikari
JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
This might came for various reasons:
这可能有多种原因:
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.Other situation is, in
JDBC
palette if the number of connections (default 100) is more than number of BW jobs (default 0 for infinite).
在许多情况下,主要问题是连接的限制。
如果您有交互并且不使用连接池,则可能在数据库中达到了连接限制。其他情况是,在
JDBC
调色板中,如果连接数(默认为 100)多于 BW 作业数(默认为 0 表示无限)。
Important: "Generally one needs to close the statement or Resultset
before reusing them".
重要提示:“通常需要关闭语句或Resultset
在重用它们之前”。