Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

javax.jcr.InvalidItemStateException when when I remove the component.

Avatar

Level 4

Hello.

Guys, please tell me. What could be causing this error?

I add a component to a page and when I remove it I get an error.

aliaksandr_hvozdzeu_0-1622664769755.png

To work further I have to reload the page.

There is an error in the logs:

aliaksandr_hvozdzeu_1-1622664901283.png

All bundles are active. AEM version 6.5.8

Very grateful in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hello,

I experience this issue, if

1. you have shard servers configured to divide content

      - if yes, do you see similar issue when you directly access the app server not via web server/above

2. you are executing operations at deletion of component node (before_delete or after_delete or similar)

 

plz share so that we can suggest!!

View solution in original post

5 Replies

Avatar

Community Advisor

@aliaksandr_hvozdzeu,

Is there. custom cq:listener or some sort of JavaScript running on the author, wherever a component have been removed from the page?

No, nothing like that. This message appears for any component and appeared after the version update from 6.5.6 to 6.5.8.

Avatar

Correct answer by
Level 9

Hello,

I experience this issue, if

1. you have shard servers configured to divide content

      - if yes, do you see similar issue when you directly access the app server not via web server/above

2. you are executing operations at deletion of component node (before_delete or after_delete or similar)

 

plz share so that we can suggest!!

Avatar

Level 4

I am performing a component removal on a web server on the author. 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.

But in the CRX can see that the component has been removed.

However, if I do this on a local Instance, I don't see such an error.

 

 

 

Avatar

Level 9
so it means the performed action did not sync/modify the repository completely before performing new action. Now, couple of things you can do 1. add OOTB event listener to refresh the parent or page based on delete (only for those which is getting this issue) or 2. work with devops team to see if the request floating correctly to right box before and after delete (if you are using multiple author servers shadowed by webserver in case)