Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2408

JcrNodeResourceIterator logs on error level for deleted Nodes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: JCR Resource 2.0.10
    • Fix Version/s: JCR Resource 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      If you get a JcrNodeResourceIterator for examply via a ResourceResolver.resolve().
      And you iterate over its entries.
      If it hapens that one of this entry is removed concurrently, the Ieterator gets an ItemNotFoundException and logs an Error.
      The behavior is correct. Iterator goes on. The existant amount of Nodes is returned.

      So I would set the log-level to warn, as this case is not an error.

      Condtion:
      ---------------
      Stirng path = /some/path
      session.getNode(path).remove()

      session.save();
      resolverOtherSession.resolve(path)

      Exception
      ---------------
      2012 09:35:22.719 ERROR [pool-9-thread-3]
      org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator seek: Problem creating Resource
      for next node, skipping javax.jcr.ItemNotFoundException: failed to build path of b126cb93-da9f-4306-
      9033-9cdfd61514c0: 29a78b34-5009-4d36-be1a-240893c6f1a1 has no child entry for b126cb93-
      da9f-4306-9033-9cdfd61514c0
      at org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:291)
      at
      org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:199)
      at org.apache.jackrabbit.core.HierarchyManagerImpl.getPath(HierarchyManagerImpl.java:395)
      at org.apache.jackrabbit.core.CachingHierarchyManager.getPath(CachingHierarchyManager.java:233)
      at org.apache.jackrabbit.core.ItemImpl.getPrimaryPath(ItemImpl.java:188)
      at org.apache.jackrabbit.core.NodeImpl.getPrimaryPath(NodeImpl.java:2753)
      at org.apache.jackrabbit.core.ItemImpl$2.perform(ItemImpl.java:379)
      at org.apache.jackrabbit.core.ItemImpl$2.perform(ItemImpl.java:376)
      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.getPath(ItemImpl.java:376)
      at org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResource.<init>(JcrNodeResource.java:88)
      at
      org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator.seek(JcrNodeResourceIterator.jav

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              chkeller Christan Keller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: