Expand my Community achievements bar.

SOLVED

com.day.cq.wcm.webservicesupport.impl.statistics.ServicesStatisticsJob Updating cloud services usage statistics failed. javax.jcr.InvalidItemStateException:

Avatar

Level 1

Hi Team,

Please help us on this error why we are getting this exception from our repository (CQ5.6.1). Please let us know if you required further information.

     

06/04/2015
11:00:00.368

04.06.2015 11:00:00.368 *ERROR* [pool-6-thread-4] com.day.cq.wcm.webservicesupport.impl.statistics.ServicesStatisticsJob Updating cloud services usage statistics failed. javax.jcr.InvalidItemStateException: Unable to update a stale item: item.save()
          at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:262)
          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 com.day.crx.core.CRXSessionImpl.save(CRXSessionImpl.java:142)
          at com.day.cq.wcm.webservicesupport.impl.statistics.ServicesStatisticsServiceImpl.updateStats(ServicesStatisticsServiceImpl.java:211)
          at com.day.cq.wcm.webservicesupport.impl.statistics.ServicesStatisticsJob.run(ServicesStatisticsJob.java:60)
          at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:105)
          at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 22a91e3d-2559-43ac-b209-e74457728a05/{}total has been modified externally
          at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:679)
          at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1507)
          at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1537)
          at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:400)
          at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
          at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:375)
          at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:275)
          at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:258)
          ... 15 more

-

 

 

Thanks,

1 Accepted Solution

Avatar

Correct answer by
Level 10

If you are not have any integration & not using cloud services then disable the ServicesStatisticsJob by "unbind" the configuration of the service with PID com.day.cq.wcm.webservicesupport.impl.statistics.ServicesStatisticsJob
You can reach the configuration directly at this URL.

http://HOST:PORT/system/console/configMgr/com.day.cq.wcm.webservicesupport.impl.statistics.ServicesS...

if you are using integration then need some debugging session to see which were concurrent thread. please engage with official support.

View solution in original post

2 Replies

Avatar

Level 1

Suggested the HOT fix  : HF NPR-3164 in the Adobe support  ticket 73004. But we already deployed this hot fix last year itself. Please suggest on on below exception why it is occurring. 

Avatar

Correct answer by
Level 10

If you are not have any integration & not using cloud services then disable the ServicesStatisticsJob by "unbind" the configuration of the service with PID com.day.cq.wcm.webservicesupport.impl.statistics.ServicesStatisticsJob
You can reach the configuration directly at this URL.

http://HOST:PORT/system/console/configMgr/com.day.cq.wcm.webservicesupport.impl.statistics.ServicesS...

if you are using integration then need some debugging session to see which were concurrent thread. please engage with official support.