**瑱
2021-03-18 16:19
采纳率: 66.7%
浏览 25
已结题

300个设备我用了任务调度,时间内统计,达到要求删除某表的元素,另一张表增加一些元素。一台没问题;

2021-03-18 09:11:52.931 ERROR ---  [     pool-2-thread-1] o.s.s.support.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task.
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:305)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:378)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:475)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:289)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
	at com.xhdl.datacloud.dropageing.service.impl.RepeaterAgingMsgServiceImpl$$EnhancerBySpringCGLIB$$167a2081.autoFindAgeingInData(<generated>)
	at com.xhdl.datacloud.dropageing.schedule.AgeingSchedule.repeaterAgingAutoSchedule(AgeingSchedule.java:33)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: null
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:908)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1229)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1225)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:90)
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:262)
	... 21 common frames omitted
Caused by: java.lang.InterruptedException: null
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(Unknown Source)
	at java.util.concurrent.CountDownLatch.await(Unknown Source)
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:881)
	... 25 common frames omitted
2021-03-18 09:42:43.269 ERROR ---  [     Druid-ConnectionPool-Destroy-1427381743] com.alibaba.druid.pool.DruidDataSource - keepAliveErr
java.sql.SQLRecoverableException: IO 错误: Connection reset
	at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:866)
	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1259)
	at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)
	at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)
	at com.alibaba.druid.pool.vendor.OracleValidConnectionChecker.isValidConnection(OracleValidConnectionChecker.java:84)
	at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1346)
	at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:2813)
	at com.alibaba.druid.pool.DruidDataSource$DestroyTask.run(DruidDataSource.java:2562)
	at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2549)
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(Unknown Source)
	at java.net.SocketInputStream.read(Unknown Source)
	at oracle.net.ns.Packet.receive(Packet.java:282)
	at oracle.net.ns.DataPacket.receive(DataPacket.java:103)
	at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:230)
	at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
	at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
	at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
	at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
	at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
	at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
	at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
	at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)
	... 9 common frames omitted
  • 好问题 提建议
  • 收藏

1条回答 默认 最新

  • KK架构 2021-03-18 16:24
    已采纳

    数据库连接失败了,检查一下连接。

    已采纳该答案
    评论
    解决 1 无用
    打赏 举报

相关推荐 更多相似问题