程序运行一段时间后,出现下面异常。 偶尔出现。数据库sqlserver 2019-03-25 16:00:08,887 ERROR impl.OrderServiceImpl.selectOrderByCode(77) - Exception:nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
### The error may exist in com/pfss/mapping/OrderMapper.xml
### The error may involve com.pfss.dao.OrderMapper.selectOrderByCode
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
### The error may exist in com/pfss/mapping/OrderMapper.xml
### The error may involve com.pfss.dao.OrderMapper.selectOrderByCode
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:76)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:421)
at com.sun.proxy.$Proxy11.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:69)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy37.selectOrderByCode(Unknown Source)
at com.pfss.service.impl.OrderServiceImpl.selectOrderByCode(OrderServiceImpl.java:75)
at com.pfss.controller.ErpController.getErpOrder(ErpController.java:191)
at com.pfss.controller.ErpController.timeStartdatacollect(ErpController.java:348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
### The error may exist in com/pfss/mapping/OrderMapper.xml
### The error may involve com.pfss.dao.OrderMapper.selectOrderByCode
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
### The error may exist in com/pfss/mapping/OrderMapper.xml
### The error may involve com.pfss.dao.OrderMapper.selectOrderByCode
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:76)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:421)
at com.sun.proxy.$Proxy11.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:69)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy37.selectOrderByCode(Unknown Source)
at com.pfss.service.impl.OrderServiceImpl.selectOrderByCode(OrderServiceImpl.java:75)
at com.pfss.controller.ErpController.getErpOrder(ErpController.java:191)
at com.pfss.controller.ErpController.timeStartdatacollect(ErpController.java:348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
解决方案 »
- Java 线程 同步代码块内代码没执行(无死锁)(附源码)
- 开发SWT组件问题
- 谁能帮我把这段JDK5的代码翻译成1.4的?主要是for和ArrayList
- 请问中jtable如何设成只读,不让用户修改
- 我写了个java记事本,想和windows的一样,想实现一些功能(Unicode控制字符的插入和显示,从右往左阅读)
- Calendar set方法,有时候不会主动刷新,真奇怪,必须调用get之类的方法
- 谁能帮推荐一些关于如何进行测试的网站,up有分
- CSDN的新论坛太破了
- Google靠什么盈利?
- 在静态上下文中不能引用非静态变量 this WindowAdapter e=new MyAdapter();why?
- 有没有大佬帮助我这个初学者
- 求Java编程
sqlserver.jdbc.url=jdbc:sqlserver://127.0.0.1;DatabaseName=test;integratedSecurity=false
sqlserver.jdbc.username=aaa
sqlserver.jdbc.password=bbbb
sqlserver.jdbc.initialSize=1
sqlserver.jdbc.minIdle=1
sqlserver.jdbc.maxActive=20
sqlserver.jdbc.maxWait=60000
sqlserver.jdbc.removeAbandoned=true
sqlserver.jdbc.removeAbandonedTimeout=180
sqlserver.jdbc.timeBetweenEvictionRunsMillis=60000
sqlserver.jdbc.minEvictableIdleTimeMillis=300000
sqlserver.jdbc.validationQuery=select 1
sqlserver.jdbc.testWhileIdle=true
sqlserver.jdbc.testOnBorrow=false
sqlserver.jdbc.testOnReturn=false
sqlserver.jdbc.url=jdbc:sqlserver://127.0.0.1;DatabaseName=test;integratedSecurity=false
sqlserver.jdbc.username=aaa
sqlserver.jdbc.password=bbbb
sqlserver.jdbc.initialSize=1
sqlserver.jdbc.minIdle=1
sqlserver.jdbc.maxActive=20
sqlserver.jdbc.maxWait=60000
sqlserver.jdbc.removeAbandoned=true
sqlserver.jdbc.removeAbandonedTimeout=180
sqlserver.jdbc.timeBetweenEvictionRunsMillis=60000
sqlserver.jdbc.minEvictableIdleTimeMillis=300000
sqlserver.jdbc.validationQuery=select 1
sqlserver.jdbc.testWhileIdle=true
sqlserver.jdbc.testOnBorrow=false
sqlserver.jdbc.testOnReturn=false
### The error may involve com.pfss.dao.OrderMapper.selectOrderByCode
### The error occurred while executing a query
这不是说这个地方查询的sql不能持久化吗?你贴个数据库配置干嘛?