Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-1690

SQL Server Error Code 1205 = DeadlockLoser

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.6
    • Fix Version/s: 1.2.7, 2.0 M3
    • Component/s: Data
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Here's the stack:

      org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [update scorecardnodescores set stale = 1 from ((scorecardnodescores sns inner join scorecardnodes selfandancestors on sns.scorecardnodeid = selfandancestors.scorecardnodeid) inner join scorecardnodes sn on selfandancestors.scorecardrootnodeid = sn.scorecardrootnodeid) where sn.scorecardnodeid in (?) and selfandancestors.leftbound <= sn.leftbound and selfandancestors.rightbound >= sn.rightbound and stale = 0]; SQL state [40001]; error code [1205]; Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.; nested exception is java.sql.SQLException: Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
      java.sql.SQLException: Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
      at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:682)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:454)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:676)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:738)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:746)
      at com.spider.scoreboard.dao.impl.PrecalculatedScoresDAOImpl.clearNodeAndAncestorScores(PrecalculatedScoresDAOImpl.java:336)
      at com.spider.scoreboard.service.impl.PrecalculatedScoresServiceImpl.clearNodeAndAncestorScores(PrecalculatedScoresServiceImpl.java:76)
      at com.spider.scoreboard.service.impl.PrecalculatedScoresServiceImpl.clearNodeAndAncestorScores(PrecalculatedScoresServiceImpl.java:90)
      at com.spider.scoreboard.service.impl.ScorecardTreeServiceImpl.saveScorecardNode(ScorecardTreeServiceImpl.java:1410)
      at com.spider.scoreboard.metric.SaveMetricAction.execute(SaveMetricAction.java:127)
      at com.spider.scoreboard.metric.SaveMetricAction$$FastClassByCGLIB$$84d479e3.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:698)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
      at com.spider.scoreboard.metric.SaveMetricAction$$EnhancerByCGLIB$$5772a8a.execute(<generated>)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.spider.scoreboard.framework.gzipfilter.CompressionFilter.doFilter(CompressionFilter.java:148)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.spider.scoreboard.framework.ContentTypeFilter.doFilterInternal(ContentTypeFilter.java:135)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at net.sf.morph.web.MorphFilter.doFilter(MorphFilter.java:43)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
      at com.spider.scoreboard.framework.springx.AvailableResourceFilter.doFilterInternal(AvailableResourceFilter.java:73)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.spider.scoreboard.framework.RequestLogFilter.doFilterInternal(RequestLogFilter.java:28)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Unknown Source)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                sgarlatm Matthew Sgarlata
                Last updater:
                Trevor Marshall
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  12 years, 24 weeks, 6 days ago