Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-2325

Saving group in security app fails with InvalidItemStateException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.1.2, 5.2
    • 5.1.1, 5.2
    • None
    • None

    Description

      When editing a group in security app and saving, whether changes were made or not the operation fails with an InvalidItemStateException.

      The action that saves the group, SaveGroupDialogAction, rewrites the entire node so even if you don't do any changes the node is still updated.

      Without the 'LastUpdateContentDecorator' it works without problems.
      Stacktrace:

      Caused by: javax.jcr.InvalidItemStateException: Item cannot be saved because it has been deleted externally: item.save()
      	at org.apache.jackrabbit.core.ItemSaveOperation.getTransientStates(ItemSaveOperation.java:323)
      	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:98)
      	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
      	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
      	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
      	at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:65)
      	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
      	at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
      	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:812)
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:299)
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:299)
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:299)
      	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorSessionWrapper.save(MgnlAuditLoggingContentDecoratorSessionWrapper.java:82)
      	at info.magnolia.jcr.wrapper.LastUpdateContentDecorator$LastUpdateSessionWrapper.save(LastUpdateContentDecorator.java:378)
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:299)
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:299)
      	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorSessionWrapper.save(MgnlAuditLoggingContentDecoratorSessionWrapper.java:82)
      	at info.magnolia.security.app.dialog.action.SaveGroupDialogAction.execute(SaveGroupDialogAction.java:92)
      	... 101 more
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                tmattsson Tobias Mattsson
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD