May 10, 2020
Estimated Post Reading Time ~

javax.jcr.lock.LockException: Precondition Failed



Solution: While connecting to the JCR we may use something like below.
Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
This statement may sometimes lead to an error in applications like AEM.
To avoid this we need to mention the default environemnt we are logging into.

So we should USE THIS INSTEAD.
Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray()),"crx.default");


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.