<!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;">
    Lock wait timeout exceeded; try restarting transaction
</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/564761#564761">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 all, I'm having this problem and can not really be, is that I have a table called tickets and another table called historia_estados_tickets where are saved the various states through which passes the ticket, within the table I have a ticket id_historia_estado_vigente column each time you change a status is updated with the latest id been in effect, is happening to me, when i change the status (insert into historia_estados_ticket) not update the table tickets. I have reviewed the log and I found this bug that could be causing this behavior.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">[JDBCExceptionReporter] SQL Error: 1205, SQLState: 41000
17:53:11,838 ERROR [JDBCExceptionReporter] Lock wait timeout exceeded; try restarting transaction
17:53:11,838 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:304)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at uy.com.its.itil.view.IncidenteEditBean.borrarDatos(IncidenteEditBean.java:2294)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at uy.com.its.itil.view.IncidenteEditBean.editarTicket(IncidenteEditBean.java:1305)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at uy.com.its.itil.view.IncidenteEditBean.editarTicketyListar(IncidenteEditBean.java:2435)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.GeneratedMethodAccessor2362.invoke(Unknown Source)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.faces.component.UICommand.broadcast(UICommand.java:387)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:324)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:299)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:256)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:469)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
att org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at uy.com.its.util.AuthenticationFilter.doFilter(AuthenticationFilter.java:82)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.BatchUpdateException: Lock wait timeout exceeded; try restarting transaction
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I need help!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in advance</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/564761#564761">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>