问题描述
- jdbc定时批量插入数据报错
- 错误提示如下:
Dec 19 2014 12:20:00 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:00 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:00 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:00 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:03 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:03 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:06 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:06 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:06 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:06 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:08 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:08 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:09 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:09 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:09 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:09 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:11 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:11 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:11 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:11 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:13 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:13 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:17 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:17 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:19 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:19 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:20 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 1615 SQLState: HY000
Dec 19 2014 12:20:20 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Prepared statement needs to be re-prepared
Dec 19 2014 12:20:21 AM org.hibernate.util.JDBCExceptionReporter logExceptions
32 AM org.hibernate.util.JDBCExceptionReporter logExceptions注:定时器设置为每10分钟执行一次,使用的数据库为MySQL
解决方案
解决方案二:
测试一下你的jdbC连接能否正常连通数据库,如果可以的话,说明是你的定时执行配置的有问题。把你的定时器及相关代码贴出来看看,报错信息太少了,看不出来是什么问题
解决方案三:
Prepared statement needs to be re-prepared