3 Replies Latest reply on Oct 19, 2010 12:11 PM by Agustin Sivoplás Ferrari

    Prepared statement needs to be re-prepared

    Agustin Sivoplás Ferrari Expert

      Hi everybody, i tired to search in web pages this error, but i not found a solution. I'm recieving this error in the log but i can't identify why.

       

      Copy the log:

       

      ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
      at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
      at uy.com.its.itil.tasks.TicketTimeUpdaterTask.execute(TicketTimeUpdaterTask.java:77)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      Caused by: java.sql.BatchUpdateException: Prepared statement needs to be re-prepared
      at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
      ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
           at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
           at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
           at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
           at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
           at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
           at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
           at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
           at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
           at uy.com.its.itil.tasks.TicketTimeUpdaterTask.execute(TicketTimeUpdaterTask.java:77)
           at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      Caused by: java.sql.BatchUpdateException: Prepared statement needs to be re-prepared
           at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)
           at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)
           at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
           at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
      

       

      Regards