Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Component deletion triggers error message


Level 4


Could you please tell me with such an error that appeared after applying the service package +6.5.4?

When deleting a component in author we're getting an error message (see attached image). The component also stays on the page until we do a manual refresh of the page. Deleting a component deletes it from the page without triggering a error message and without requiring a page refresh.


Steps to reproduce:

  1. Add a component to the page
  2. Delete it
  3. Notice the error message at the top of the page
  4. Notice the component isn't deleted
  5. Refresh the page
  6. Notice the component is deleted



Caused by: javax.jcr.InvalidItemStateException: This item [/content/............/global/templates/test-wd/jcr:content/parsys/panel/parsys/text_1467308130] does not exist anymore
	at org.apache.jackrabbit.oak.jcr.delegate.ItemDelegate.checkAlive(ItemDelegate.java:86)
	at org.apache.jackrabbit.oak.jcr.session.operation.ItemOperation.checkPreconditions(ItemOperation.java:34)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:614)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:204)
	at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.hasProperty(NodeImpl.java:862)
	at org.apache.sling.jcr.resource.internal.JcrValueMap.read(JcrValueMap.java:332)
	... 154 common frames omitted



Very grateful in advance for any advice.



7 Replies


Community Advisor

Hi @aliaksandr_hvozdzeu,

Assuming the inputs you shared on other thread for similar issue is same which is, 

  • The issue happens on author webserver after installing service pack (Not evident on local/application server)
    • Could you please clear the cache directories every time you install service package/hot fix/application package (In particular, /apps or /libs path)
    • Also, cross check you are not caching any content in author webserver. 


Community Advisor

Hi @aliaksandr_hvozdzeu ,

      Did you added the listner to that component so that after deleting component it will auto refresh.

If listner not added then try adding it.




Level 4

One note. I see 500 request error in the POST delete request. 


Level 4

Thanks all for your help. I fixed this issue. 

The problem was that in our class we were receiving an invalid resource from a request to delete a component.

It was enough to change from

Resource resource = request.getResource();


Resource resource = context.getRequest().getResource();

in extended