[ 
https://issues.apache.org/jira/browse/SLING-5018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ian Boston resolved SLING-5018.
-------------------------------
       Resolution: Fixed
    Fix Version/s: JCR Resource 2.3.12

Fixed by installing JCR Resource 2.3.12  containing SLING-4074 which no longer 
throws IllegalStateException. No code changes made to address this bug.

> JobManager.findJobs throws exception when job gets removed while querying.
> --------------------------------------------------------------------------
>
>                 Key: SLING-5018
>                 URL: https://issues.apache.org/jira/browse/SLING-5018
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Event 3.7.4
>         Environment: Oak on MongoMK with custom compound indexes to speed up 
> queries.
>            Reporter: Ian Boston
>             Fix For: JCR Resource 2.3.12
>
>
> The following exception is seen with a system under light Job Load viewing a 
> page that needs to list jobs.
> {code}
> 10.09.2015 16:10:51.634 *ERROR* [160.46.173.180 [1441894183258] GET 
> /libs/wcm/core/content/reference.json HTTP/1.1] 
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught 
> Throwable
> javax.servlet.ServletException: java.lang.IllegalStateException: Failed to 
> retrieve path from Item:
>       at 
> com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doGet(ActivationReferenceSearchServlet.java:167)
>       at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
>       at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
>       at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
>       at 
> org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:533)
>       at 
> org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
>       at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
>       at 
> com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
>       at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>       at 
> com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:146)
> ...
> Caused by: 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.event.impl.jobs.JobManagerImpl.findJobs(JobManagerImpl.java:662)
>       at 
> com.day.cq.replication.impl.queue.ReplicationQueueImpl.entries(ReplicationQueueImpl.java:156)
>       at 
> com.day.cq.replication.impl.ReplicationStatusImpl.getQueueStatus(ReplicationStatusImpl.java:86)
>       at 
> com.day.cq.replication.impl.ReplicationStatusImpl.getPending(ReplicationStatusImpl.java:113)
>       at 
> com.day.cq.replication.impl.ReplicationStatusImpl.isPending(ReplicationStatusImpl.java:100)
>       at 
> com.day.cq.replication.impl.ReplicationStatusImpl.isDelivered(ReplicationStatusImpl.java:144)
>       at 
> com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServlet.doGet(ActivationReferenceSearchServlet.java:135)
>       ... 131 common frames omitted
> Caused by: javax.jcr.InvalidItemStateException: This item 
> [/var/eventing/jobs/assigned/7757d5f4-10a2-44c3-bb55-931db8d80a01/com.day.cq.replication.job.publish1/2015/9/10/16/10/7757d5f4-10a2-44c3-bb55-931db8d80a01_8]
>  does not exist anymore
>       at 
> org.apache.jackrabbit.oak.jcr.delegate.ItemDelegate.checkAlive(ItemDelegate.java:85)
>       at 
> org.apache.jackrabbit.oak.jcr.session.operation.ItemOperation.checkPreconditions(ItemOperation.java:34)
>       at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:290)
>       at 
> org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:113)
>       at 
> org.apache.jackrabbit.oak.jcr.session.ItemImpl.getPath(ItemImpl.java:153)
>       at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.getPath(NodeImpl.java:99)
>       at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResource.getPath(JcrItemResource.java:80)
>       ... 138 common frames omitted
> {code}
> Investigation indicates that the Job was removed concurrently by the Job 
> completing successfully while the UI query was being performed. 
> This issue was also reported in SLING-4853 in 3.7.2 but not fixed there at 
> the time as it was thought the exception wasn't thrown. SLING-4853 did fix a 
> different list jobs operation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to