高手一定要帮忙啊。。。关于数据库连接问题

org.springframework.dao.DataAccessResourceFailureException: StatementCallback; SQL [select * from T_MOBILE_INFO order by id]; I/O Error: Connection reset; ne
sted exception is java.sql.SQLException: I/O Error: Connection reset
Caused by: java.sql.SQLException: I/O Error: Connection reset
        at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1049)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:406)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1258)
        at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
        at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:389)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:404)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:412)
        at cn.com.jrj.g.service.suit.MobileSuitMobileInfoService.getAllMobileInfo(MobileSuitMobileInfoService.java:51)
        at cn.com.jrj.g.service.suit.MobileSuitMobileInfoService$$FastClassByCGLIB$$26f77311.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
        at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at cn.com.jrj.g.base.db.CustomerRoutingDataSourceInterceptor.invoke(CustomerRoutingDataSourceInterceptor.java:20)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
        at cn.com.jrj.g.service.suit.MobileSuitMobileInfoService$$EnhancerByCGLIB$$29fbe6d9.getAllMobileInfo(<generated>)
        at cn.com.jrj.g.job.suit.MobileXMLWork.executeInternal(MobileXMLWork.java:107)
        at cn.com.jrj.g.base.work.gAppWork.execute(gAppWork.java:39)
        at cn.com.jrj.g.base.work.gAppRunnable.run(gAppRunnable.java:19)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:168)
        at java.io.DataInputStream.readFully(DataInputStream.java:178)
        at java.io.DataInputStream.readFully(DataInputStream.java:152)
        at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:826)

谁有办法解决掉这个异常啊。

我同时跑了5个job 每一分钟 执行一次。

Spring 的db 配置 也都加了 连接验证。

为什么会出现这个异常呢。

有什么办法可以解决掉呢?

你可能感兴趣的:(高手一定要帮忙啊。。。关于数据库连接问题)