<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Prepared statement needs to be re-prepared
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/SpiritFox26">Agustin Sivoplás</a> in <i>EJB 3.0</i> - <a href="http://community.jboss.org/message/566526#566526">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Copy the log:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at uy.com.its.itil.tasks.TicketTimeUpdaterTask.execute(TicketTimeUpdaterTask.java:77)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.quartz.core.JobRunShell.run(JobRunShell.java:203)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Caused by: java.sql.BatchUpdateException: Prepared statement needs to be re-prepared</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)</div><pre class="jive-pre"><code class="jive-code">ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
&#160;&#160;&#160;&#160;&#160;at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
&#160;&#160;&#160;&#160;&#160;at uy.com.its.itil.tasks.TicketTimeUpdaterTask.execute(TicketTimeUpdaterTask.java:77)
&#160;&#160;&#160;&#160;&#160;at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
&#160;&#160;&#160;&#160;&#160;at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: java.sql.BatchUpdateException: Prepared statement needs to be re-prepared
&#160;&#160;&#160;&#160;&#160;at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)
&#160;&#160;&#160;&#160;&#160;at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
&#160;&#160;&#160;&#160;&#160;at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
</code></pre></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Regards</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/566526#566526">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB 3.0 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>