org.springframework.dao.CannotAcquireLockException: could not lock: [com.myCompany.myProject.bean.scheduling.MyClass#6306]; SQL [/* UPGRADE lock com.myCompany.myProject.bean.scheduling.MyClass */ select Area_ID from Area where Area =? and Area =? for update]; nested exception is org.hibernate.exception.LockAcquisitionException: could not lock: [com.myCompany.myProject.bean.scheduling.Area#6306]

Stack Overflow | A_Elric | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Logstash pattern matching more than it should

    Stack Overflow | 7 months ago | A_Elric
    org.springframework.dao.CannotAcquireLockException: could not lock: [com.myCompany.myProject.bean.scheduling.MyClass#6306]; SQL [/* UPGRADE lock com.myCompany.myProject.bean.scheduling.MyClass */ select Area_ID from Area where Area =? and Area =? for update]; nested exception is org.hibernate.exception.LockAcquisitionException: could not lock: [com.myCompany.myProject.bean.scheduling.Area#6306]

    Root Cause Analysis

    1. org.springframework.dao.CannotAcquireLockException

      could not lock: [com.myCompany.myProject.bean.scheduling.MyClass#6306]; SQL [/* UPGRADE lock com.myCompany.myProject.bean.scheduling.MyClass */ select Area_ID from Area where Area =? and Area =? for update]; nested exception is org.hibernate.exception.LockAcquisitionException: could not lock: [com.myCompany.myProject.bean.scheduling.Area#6306]

      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException()
    2. Hibernate
      HibernateExceptionTranslator.translateExceptionIfPossible
      1. org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:639)
      2. org.springframework.orm.hibernate3.HibernateExceptionTranslator.convertHibernateAccessException(HibernateExceptionTranslator.java:89)
      3. org.springframework.orm.hibernate3.HibernateExceptionTranslator.translateExceptionIfPossible(HibernateExceptionTranslator.java:68)
      3 frames
    3. Spring Tx
      PersistenceExceptionTranslationInterceptor.invoke
      1. org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
      2. org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
      3. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
      3 frames
    4. Spring AOP
      CglibAopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
      2 frames
    5. com.myCompany.myProject
      Area$$FastClassBySpringCGLIB$$220c3d67.invoke
      1. com.myCompany.myProject.dal.hibernate.Impl$$EnhancerBySpringCGLIB$$535be625.lock(<generated>)
      2. com.myCompany.myProject.scheduling.Area.AreaClose(MyClass.java:1265)
      3. com.myCompany.myProject.scheduling.Area.handleProviderDisconnect(MyClass.java:1190)
      4. com.myCompany.myProject.scheduling.Area$$FastClassBySpringCGLIB$$220c3d67.invoke(<generated>)
      4 frames
    6. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      1 frame
    7. Spring AOP
      CglibAopProxy$CglibMethodInvocation.invokeJoinpoint
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:700)
      1 frame