Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5547

Do not re-throw RuntimeException in DuplicateNodePredicate when InvalidItemStateException occurrs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.1
    • Component/s: None
    • Labels:
      None
    • Magnolia Release:
      5.2.1

      Description

      Integration tests run into this exception when trying to migrate from 4.5 version to 5.2.1-SNAPSHOT.
      This is most likely what happened:

      • Query returned NodeIterator result
      • In the meantime one or more of the returned nodes were deleted in another session/re-bootstrapped
      • When looping through nodes in the NodeIterator and trying to determine duplicates InvalidItemStateException occurs and is re-thrown as RuntimeException
      [INFO] [talledLocalContainer] 2013-12-13 11:00:25,070 ERROR info.magnolia.module.InstallContextImpl           : > Error while installing or updating core module. Task 'Find and remove all openWFE permissions from the userroles workspace' failed. (InvalidItemStateException: Item does not exist anymore: e1f72887-a8a4-4ed2-a068-fefe14711722)
      [INFO] [talledLocalContainer] java.lang.RuntimeException: Item does not exist anymore: e1f72887-a8a4-4ed2-a068-fefe14711722
      [INFO] [talledLocalContainer] 	at info.magnolia.jcr.predicate.DuplicateNodePredicate.evaluateTyped(DuplicateNodePredicate.java:59)
      [INFO] [talledLocalContainer] 	at info.magnolia.jcr.predicate.DuplicateNodePredicate.evaluateTyped(DuplicateNodePredicate.java:47)
      [INFO] [talledLocalContainer] 	at info.magnolia.jcr.predicate.AbstractPredicate.evaluate(AbstractPredicate.java:50)
      [INFO] [talledLocalContainer] 	at org.apache.jackrabbit.commons.iterator.FilteringNodeIterator.seekNext(FilteringNodeIterator.java:114)
      [INFO] [talledLocalContainer] 	at org.apache.jackrabbit.commons.iterator.FilteringNodeIterator.nextNode(FilteringNodeIterator.java:76)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.delta.QueryTask.doExecute(QueryTask.java:67)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:60)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:512)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:494)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:277)
      [INFO] [talledLocalContainer] 	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:415)
      [INFO] [talledLocalContainer] 	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:412)
      [INFO] [talledLocalContainer] 	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:386)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:271)
      [INFO] [talledLocalContainer] 	at info.magnolia.module.ui.ModuleManagerNullUI.onStartup(ModuleManagerNullUI.java:69)
      [INFO] [talledLocalContainer] 	at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:151)
      [INFO] [talledLocalContainer] 	at info.magnolia.init.MagnoliaServletContextListener$1.doExec(MagnoliaServletContextListener.java:249)
      [INFO] [talledLocalContainer] 	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:415)
      [INFO] [talledLocalContainer] 	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:412)
      [INFO] [talledLocalContainer] 	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:386)
      [INFO] [talledLocalContainer] 	at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:246)
      [INFO] [talledLocalContainer] 	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:172)
      [INFO] [talledLocalContainer] 	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:126)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
      [INFO] [talledLocalContainer] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
      [INFO] [talledLocalContainer] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      [INFO] [talledLocalContainer] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      [INFO] [talledLocalContainer] 	at org.mortbay.jetty.Server.doStart(Server.java:224)
      [INFO] [talledLocalContainer] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      [INFO] [talledLocalContainer] 	at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
      [INFO] [talledLocalContainer] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [INFO] [talledLocalContainer] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [INFO] [talledLocalContainer] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [INFO] [talledLocalContainer] 	at java.lang.reflect.Method.invoke(Method.java:601)
      [INFO] [talledLocalContainer] 	at org.mortbay.start.Main.invokeMain(Main.java:194)
      [INFO] [talledLocalContainer] 	at org.mortbay.start.Main.start(Main.java:534)
      [INFO] [talledLocalContainer] 	at org.mortbay.start.Main.start(Main.java:441)
      [INFO] [talledLocalContainer] 	at org.mortbay.start.Main.main(Main.java:119)
      [INFO] [talledLocalContainer] Caused by: javax.jcr.InvalidItemStateException: Item does not exist anymore: e1f72887-a8a4-4ed2-a068-fefe14711722
      [INFO] [talledLocalContainer] 	at org.apache.jackrabbit.core.ItemImpl.itemSanityCheck(ItemImpl.java:116)
      [INFO] [talledLocalContainer] 	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:90)
      [INFO] [talledLocalContainer] 	at org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:376)
      [INFO] [talledLocalContainer] 	at info.magnolia.jcr.predicate.DuplicateNodePredicate.evaluateTyped(DuplicateNodePredicate.java:54)
      [INFO] [talledLocalContainer] 	... 45 more
      

        Attachments

          Activity

            People

            Assignee:
            jsimak Jaroslav Simak
            Reporter:
            jsimak Jaroslav Simak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: