最近遇到这个Spring datasouces closed的错误:
[admin@server4 ~]$ tail -300 /duitang/logs/usr/crawler/crawler.log at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.duitang.dboss.service.ServiceInvoker.doaccept2(ServiceInvoker.java:127) ... 10 more Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Data source is closed at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:573) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:637) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:674) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:714) at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:785) at com.duitang.biz.common.SqlServiceImpl.queryForLong(SqlServiceImpl.java:262) ... 14 more Caused by: java.sql.SQLException: Data source is closed at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1362) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at com.duitang.common.data.RouterDataSource.getConnection(RouterDataSource.java:103) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ... 21 more ERROR 08-21 10:03:59 item:171 dboss invoke ERROR: url =dboss2://sqlService/queryForLong?q=%5B%22select+id+from+message_messagesource+where+img_src_sum+%3D+%3F%22%2C+%22%5B%5C%22e6e01b2184f47acca40dcfb0476b5d15%5C%22%5D%22%5D message=500com.duitang.dboss.remote.oio.DbossException: java.lang.reflect.InvocationTargetException at com.duitang.dboss.service.ServiceInvoker.doaccept2(ServiceInvoker.java:136) at com.duitang.dboss.service.ServiceInvoker.accept(ServiceInvoker.java:46) at com.duitang.dboss.remote.nio.DbossServerHandler.messageReceived(DbossServerHandler.java:40) at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:98) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:796) at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69) at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:307) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.duitang.dboss.service.ServiceInvoker.doaccept2(ServiceInvoker.java:127) ... 10 more Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Data source is closed at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:573) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:637) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:674) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:714) at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:785) at com.duitang.biz.common.SqlServiceImpl.queryForLong(SqlServiceImpl.java:262) ... 14 more Caused by: java.sql.SQLException: Data source is closed at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1362) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at com.duitang.common.data.RouterDataSource.getConnection(RouterDataSource.java:103) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ... 21 more
Caused by: org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in com/duitang/model/mysql/blog/AlbumDO.xml. --- The error occurred while executing query. --- Check the select id,status,category,user_id,name,count,like_count,comment_count,album_album.desc,create_datetime from album_album where id =? . --- Check the SQL Statement (preparation failed). --- Cause: java.sql.SQLException: Data source is closed; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/duitang/model/mysql/blog/AlbumDO.xml. --- The error occurred while executing query. --- Check the select id,status,category,user_id,name,count,like_count,comment_count,album_album.desc,create_datetime from album_album where id =? . --- Check the SQL Statement (preparation failed). --- Cause: java.sql.SQLException: Data source is closed at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203) at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:268) at com.duitang.model.mysql.AlbumDAO.findById(AlbumDAO.java:28) at com.duitang.biz.blog.impl.AlbumQueryServiceImpl.findAlbum(AlbumQueryServiceImpl.java:533)
原因是远程服务已经退出。
相关推荐
java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK ……
在Java编程中,`java.sql.SQLException: 结果集已耗尽` 是一个常见的错误提示,通常出现在处理数据库查询结果集时。这个异常表明程序试图访问已经没有数据的结果集中下一行,即所有行已经被遍历完,尝试访问超出范围...
标题中的“Caused by: java.sql.SQLException: JZ0SJ: 没有在此数据库中发现元数据存取器信息。 请按 jConnect 文档中所述安装”是一个典型的错误信息,表明在尝试使用Java数据库连接(JDBC)驱动程序访问数据库时...
### 服务器出现java.sql.SQLException No suitable driver found for 的解析与解决方案 #### 问题背景 在进行Servlet开发过程中,尤其是在尝试连接数据库时,遇到了一个常见的异常:“java.sql.SQLException: No ...
在oracle里面运行一下,解决Exception java.sql.SQLException ORA-00600 内部错误代码
在Oracle数据库操作中,我们经常会遇到与`java.sql.SQLException`相关的异常。这个异常通常是Java应用程序在尝试与Oracle数据库进行交互时出现的问题。本篇将详细探讨`java.sql.SQLException`的各种常见类型及其解决...
Q: I am working with ... I am using updateBinaryStream method of resultset to update the BLOB field but it is failing after giving following exception java.sql.SQLException: Internal Error: Unable to
java.sql.SQLException: null, message from server: “Host ‘223.72.41.7’ is not allowed to connect to this MySQL server” 客户端访问时报错: 解决方法: 1,登陆服务器 mysql> use mysql; //用mysql ...
主要给大家介绍了关于MySQL存储表情时报错:java.sql.SQLException: Incorrect string value: 'xF0x9Fx92xA9x0Dx0A...'的解决方法,文中通过示例代码介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
本文主要介绍了关于MySQL存储表情报错:java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x92\xA9\x0D\x0A…’的相关解决方法,分享出供大家参考学习,下面话不多说了,来一起看看详细的介绍: ...
当你遇到"java.sql.SQLException: No suitable driver"这样的错误时,通常意味着你的Java环境无法找到匹配的数据库驱动。这个问题的解决方法是确保已经正确地引入了MySQL JDBC驱动(也称为Connector/J)。 MySQL ...
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 提示的是用户访问被拒绝,原因是密码不正确,但是我们明明配置的是正确的密码,原因就在yml中: spring: datasource: ...
它实现了Java Database Connectivity (JDBC) API,使得开发者可以使用Java语言来操作Oracle数据库,执行SQL语句,进行数据查询、插入、更新和删除等操作。Oracle JDBC驱动分为不同版本,包括 Thin、OCI、JDBC-ODBC ...
java.sql.SQLException: Operation not allowed after ResultSet closed java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection should be passed in
import java.sql.SQLException; ``` 3. **注册驱动**:在使用MySQL驱动前,需要通过`Class.forName()`方法注册驱动。尽管在较新的JDBC版本中这个步骤可以省略,但为了兼容性,很多示例代码仍然包含它: ```java ...
当你尝试连接到MySQL数据库时,可能会遇到一个特定的异常:“java.sql.SQLException: The server time zone value ‘?й???????’ is unrecognized or represents more than one time zone”。这个错误表明服务器...
问题是这样的…我在VS2008直接运行打开网页,可以连接... 异常详细信息: System.Data.SqlClient.SqlException: 无法打开登录所请求的数据库 “TakeClass”。登录失败。 用户 ‘2D2727E2578F446\ASPNET’ 登录失败。
已成功与服务器建立连接,但是在登录过程中发生错误 (provider: 共享内存提供程序, error: 0 - 管道的另一端上无...行 36: if (con.State == System.Data.ConnectionState.Closed) 行 37: con.Open(); 行 38: 行 39: }
Caused by: java.sql.SQLException: java.lang.ClassNotFoundException: org.apache.hive.jdbc.HiveDriver at com.trs.gateway.commons.hive.HiveFeature.getConnection(HiveFeature.java:57) at ...