Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-61266

LockLocalServiceUtil throws DataIntegrityViolationException when trying to acquire a lock that is expired

    Details

      Description

      DESCRIPTION
      LockLocalServiceUtil throws DataIntegrityViolationException when trying to acquire a lock that is expired

      Client has provided a script to execute that demonstrates this
      STEPS TO REPRODUCE
      1. Go to Control Panel>Server Administration>Script
      2. Change language to Groovy and copy customer script
      3. Execute script
      EXPECTED RESULTS
      No errors appear
      ACTUAL RESULTS
      Error appears in the log

      18:17:56,525 ERROR [http-bio-8443-exec-8][DefaultTransactionExecutor:93] Application exception overridden by commit exception
      org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into Lock_ (uuid_, companyId, userId, userName, createDate, className, key_, owner, inheritable, expirationDate, lockId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [TPTPDEV_MASTER.IX_228562AD]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
              at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:637)
              at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)
              at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.processCommit(DefaultTransactionExecutor.java:82)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:70)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy53.lock(Unknown Source)
              at com.liferay.portal.service.LockLocalServiceUtil.lock(LockLocalServiceUtil.java:357)
      

      BRANCH
      Reproduced
      286d6e0abeee1f52e8f4a44d22dadbb7ac52da11
      MASTER
      Issue resolved in master.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ian.song Ian Song (Inactive)
                Reporter:
                christopher.kian Christopher Kian
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 29 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE