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

Iterating over JCR resources might throw IllegalStateException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • JCR Resource 2.3.8, JCR Resource 2.3.10
    • JCR Resource 2.3.12
    • JCR
    • None

    Description

      With the recent changes to speed up iterating over jcr resources, the iterator might now throw an IllegalStateException if the resource is gone in the meantime:
      java.lang.IllegalStateException: Failed to retrieve path from Item:
      at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResource.getPath(JcrItemResource.java:82)
      at org.apache.sling.resourceresolver.impl.helper.ResourceIterator.seek(ResourceIterator.java:184)
      at org.apache.sling.resourceresolver.impl.helper.ResourceIterator.<init>(ResourceIterator.java:151)
      at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:634)
      at org.apache.sling.api.resource.AbstractResource.listChildren(AbstractResource.java:97)
      at org.apache.sling.event.impl.jobs.JobTopicTraverser.traverse(JobTopicTraverser.java:145)
      at org.apache.sling.event.impl.jobs.JobTopicTraverser.traverse(JobTopicTraverser.java:86)
      at org.apache.sling.event.impl.jobs.topics.QueueJobCache.loadJobs(QueueJobCache.java:195)
      at org.apache.sling.event.impl.jobs.topics.QueueJobCache.loadJobs(QueueJobCache.java:149)
      at org.apache.sling.event.impl.jobs.topics.QueueJobCache.getNextJob(QueueJobCache.java:117)
      at org.apache.sling.event.impl.jobs.topics.TopicManager.take(TopicManager.java:227)
      at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.take(AbstractJobQueue.java:317)
      at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:305)
      at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access$000(AbstractJobQueue.java:59)
      at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue$1.run(AbstractJobQueue.java:166)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.jcr.InvalidItemStateException: Item does not exist anymore: 5b16e3ce-ea3f-444f-9161-77cec2831976
      at org.apache.jackrabbit.core.ItemImpl.itemSanityCheck(ItemImpl.java:116)
      at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:90)
      at org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:376)
      at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResource.getPath(JcrItemResource.java:80)
      ... 15 common frames omitted

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cziegeler Carsten Ziegeler
            cziegeler Carsten Ziegeler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment