rror 1615 tate 000-jdbc定时批量插入数据报错

问题描述

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

解决方案

参考:http://stackoverflow.com/questions/4380813/how-to-get-rid-of-mysql-error-prepared-statement-needs-to-be-re-prepared

解决方案二:
测试一下你的jdbC连接能否正常连通数据库,如果可以的话,说明是你的定时执行配置的有问题。把你的定时器及相关代码贴出来看看,报错信息太少了,看不出来是什么问题

解决方案三:
Prepared statement needs to be re-prepared

时间: 2024-11-03 22:03:57

rror 1615 tate 000-jdbc定时批量插入数据报错的相关文章

vba-关于excel宏向数据库插入数据报错

问题描述 关于excel宏向数据库插入数据报错 cConnect = "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=root;SERVER=testdb;PWD=root" For i = 1 To iEndrow Lotid = Sheets("lotlist").Range(Cells(iEndrow, "A"), Cells(iEndrow, "A")).Value sqlst

Windows下elasticsearch插入数据报错!

按照官方文档操作,但是windows下有些不同,它不认识单引号',因此如果这样操作,就会报错: C:\Users\neusoft>curl localhost:9200/b1/b2/1 -d {"name":"fdafa"} {"error":"MapperParsingException[failed to parse]; nested: JsonParseException[Un recognized token 'fdafa

插入数据报错Data truncation: Data too long for column

问题描述 使用mysql数据库字段description,类型varchar,长度200,输入200个字符(中间有个回车),alert出来是200个字符,但插入报错,再删掉一个字符就没问题.不知道是什么原因...  问题补充:<div class="quote_title">khan 写道</div><div class="quote_div">不好意思,回车也是字符,在存储的时候也要占空间的啊.</div><b

preparedstatement插入数据报错的问题

问题描述 preparedstatement=connection.prepareStatement("select*fromclass1wherestudentname=?andsex=?");preparedstatement.setString(1,"小李");//到这里就报错了preparedstatement.setString(2,"男");这是报错的代码Exceptioninthread"main"java.la

大神帮忙:一个vb.net向数据库插入数据报错的问题

问题描述 最近用vb.net向sybase数据库插入数据时有时会报错:attemptedtoreadorwriteprotectedmemory.Thisisoftenanindicationthatothermemoryiscorrupt.这个error没有的时候又会报这样的错误:'Sybase.ASEOLEDBProvider'failedwithnoerrormessageavalible,resultcode:E_OUTOFMEMORY(0x8007000E),因为之前用的是sybase

Entity Framework插入数据报错:Validation failed for one or more entities

今天在处理Entity Framework插入数据库时,报错: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. 一直我一直用Exception ex,这个通用异常处理,一点都差不多哪里出错了.对照实体model和数据库表也都没有一点问题(EF刚开始用,以前都是同事给写好了,我只做前端): 1.解决第一步: 但是,按照他的提示 "See 'Enti

请教一个向sybase插入数据报错:the given type name was unrecognized的问题

问题描述 Dimvalue1asstringDimvalue2asstringDimvalue3asstringDimvalue4asstringDimnewQueryasstring="INSERTINTOrknet..Mapping(colm1,colm2,colm3,colm4)VALUES(?,?,?,?)"DimOLECmdasnewOleDbCommand(newQuery,oleDBconn)oleDBconn.open()OLECmd.parameter.AddWith

Entity Framework插入数据报错:Validation failed for one or more entities. See &amp;#39;EntityValidationErrors&amp;#39; property for more details.

stackoverflow的解决方法 try { db.Entity.Add(entity); db.SaveChanges(); } catch (DbEntityValidationException dbEx) { foreach (var validationErrors in dbEx.EntityValidationErrors) { foreach (var validationError in validationErrors.ValidationErrors) { System

java实现jdbc批量插入数据_java

首先介绍三种JDBC批量插入编程方法,进行比较,具体内容如下 JDBC批量插入主要用于数据导入和日志记录因为日志一般都是先写在文件下的等. 我用Mysql 5.1.5的JDBC driver 分别对三种比较常用的方法做了测试 方法一:使用PreparedStatement加批量的方法 try { Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection(o_url, userName, pass