When trying to edit the page while impersonating as admin throws "Not an owner of the lock" exception.
Hi Everyone,
I'm working on AEM 6.5 and faced below issue, and thanks for the help in advance.
So here is the situation:
Let's assume there is an author A who has authored a page and locked it. I am an author B who is impersonated as admin. Now I'm trying to edit a particular component on that page. That component is associated with a servlet which changes node name based on the input in the component. In that servlet, there is a logic which unlocks that page path, modifies the node name and then locks it again.
In normal situation it is working fine as expected but as soon as I impersonate as admin and try to make some changes it throws the exception
javax.jcr.lock.LockException: Not an owner of the lock
So, what can be the reason and solution for this problem?