Hi Folks, technical question: can anyone suggest on how to avoid / recover from InvalidItemStateExceptions?
Here’s the use case/problem: * we’re using advanced cache / notifyFlushListeningPolicy * we’re bulk creating tons of nodes in various workspaces using a bulk action; the action is performed in system context * nodes are created just fine, this is all right, however… * PROBLEM: updating the lastUpdateTimeStamp property fails with the exception below [1]… * interesting: the exception does not appear if I perform the operation for the first time after starting Magnolia.. it seems that somehow the state is not written back correctly in the NotifyFlushListeningPolicy? Here some concrete questions? * did anyone experience the same issues with the NotifyFlushListeningPolicy? * since we know we’re doing lots of stuff in the workspaces: is there a way to temporarily turn off updating this property and just writing it once? * is there a way to recover from an InvalidItemState in some way? * any other idea to avoid this exception? Thanks in advance, cheers, Vivian [1] Full Exception Stack trace: 2015-10-29 14:29:15,933 WARN org.apache.jackrabbit.core.ItemSaveOperation : /modules/advanced-cache/config/notifyFlushListeningPolicy/lastUpdateTimeStamp: failed to restore transient state 2015-10-29 14:29:15,934 ERROR ia.jcr.wrapper.MgnlPropertySettingContentDecorator: Failed to update LUD for session: session-admin-318::config javax.jcr.InvalidItemStateException: property /modules/advanced-cache/config/notifyFlushListeningPolicy/lastUpdateTimeStamp: the property cannot be saved because it has been modified externally. at org.apache.jackrabbit.core.PropertyImpl.makePersistent(PropertyImpl.java:161) at org.apache.jackrabbit.core.ItemSaveOperation.persistTransientItems(ItemSaveOperation.java:849) at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:243) 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:297) at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) at info.magnolia.jcr.wrapper.MgnlPropertySettingContentDecorator$MgnlPropertySettingSessionWrapper.save(MgnlPropertySettingContentDecorator.java:492) at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) at info.magnolia.audit.MgnlAuditLoggingContentDecoratorSessionWrapper.save(MgnlAuditLoggingContentDecoratorSessionWrapper.java:82) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy$InitOrUpdateTimeStampOp.exec(NotifyFlushListeningPolicy.java:127) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy$InitOrUpdateTimeStampOp.exec(NotifyFlushListeningPolicy.java:98) at info.magnolia.cms.security.JCRSessionOp.exec(JCRSessionOp.java:67) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:371) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy.updateLastUpdateTimestamp(NotifyFlushListeningPolicy.java:61) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy.preHandleEvents(NotifyFlushListeningPolicy.java:46) at info.magnolia.module.cache.AbstractListeningFlushPolicy$CacheCleaner.onEvent(AbstractListeningFlushPolicy.java:193) at info.magnolia.cms.util.ObservationUtil$ObservationBasedDelayedExecutor$1.run(ObservationUtil.java:253) at info.magnolia.cms.util.DelayedExecutor$RunnableWrapper.run(DelayedExecutor.java:103) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) 2015-10-29 14:29:15,935 ERROR ia.module.advancedcache.NotifyFlushListeningPolicy: Failed to store cache last update timestamp. All entries will be flushed from cache on restart. javax.jcr.InvalidItemStateException: property /modules/advanced-cache/config/notifyFlushListeningPolicy/lastUpdateTimeStamp: the property cannot be saved because it has been modified externally. at org.apache.jackrabbit.core.PropertyImpl.makePersistent(PropertyImpl.java:161) at org.apache.jackrabbit.core.ItemSaveOperation.persistTransientItems(ItemSaveOperation.java:849) at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:243) 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:297) at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) at info.magnolia.jcr.wrapper.MgnlPropertySettingContentDecorator$MgnlPropertySettingSessionWrapper.save(MgnlPropertySettingContentDecorator.java:492) at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) at info.magnolia.audit.MgnlAuditLoggingContentDecoratorSessionWrapper.save(MgnlAuditLoggingContentDecoratorSessionWrapper.java:82) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy$InitOrUpdateTimeStampOp.exec(NotifyFlushListeningPolicy.java:127) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy$InitOrUpdateTimeStampOp.exec(NotifyFlushListeningPolicy.java:98) at info.magnolia.cms.security.JCRSessionOp.exec(JCRSessionOp.java:67) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:371) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy.updateLastUpdateTimestamp(NotifyFlushListeningPolicy.java:61) at info.magnolia.module.advancedcache.NotifyFlushListeningPolicy.preHandleEvents(NotifyFlushListeningPolicy.java:46) at info.magnolia.module.cache.AbstractListeningFlushPolicy$CacheCleaner.onEvent(AbstractListeningFlushPolicy.java:193) at info.magnolia.cms.util.ObservationUtil$ObservationBasedDelayedExecutor$1.run(ObservationUtil.java:253) at info.magnolia.cms.util.DelayedExecutor$RunnableWrapper.run(DelayedExecutor.java:103) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com> ----------------------------------------------------------------