Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-7288

Unable to save a content after inserting a content attachment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.0
    • 4.0 alpha
    • None
    • None

      How to reproduce

      • Edit a content
      • Insert a link to an attachment
      • Save
      Caused by: javax.jcr.lock.LockException: Cannot add lock token: lock already held by other session. (lock held by node /ametys:root/ametys-internal:sites/45/7d/www/ametys-internal:contents/2d/e4/nouveau-article-2)
      	at org.apache.jackrabbit.core.lock.LockInfo.throwLockException(LockInfo.java:269)
      	at org.apache.jackrabbit.core.lock.LockManagerImpl.addLockToken(LockManagerImpl.java:766)
      	at org.apache.jackrabbit.core.lock.XALockManager.addLockToken(XALockManager.java:218)
      	at org.apache.jackrabbit.core.lock.SessionLockManager.addLockToken(SessionLockManager.java:95)
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata._checkLock(JCRCompositeMetadata.java:1598)
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata.setMetadata(JCRCompositeMetadata.java:919)
      

      The lock token is hold by the workflow action 12 just before saving content.

      If we wait after inserting attachment or try to save again after error, it works well...

      Note that the workflow action 12 is called as soon as we select a file attachment, even if we haven't upload a new attachment.

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: