0

When I upload files in AEM, I get the following exception:

OakState0001: Unresolved conflicts in ....

I use the AssetManager API for uploading assets. Why do I get this error?

trincot
  • 317,000
  • 35
  • 244
  • 286
rohit_mhetre
  • 9
  • 1
  • 6
  • "unresolved conflicts" ... are there several people working on this project? – Stultuske Feb 12 '19 at 10:09
  • This is happening due to long running threads and session is not get refresh when your thread try to save the session. I found a good article on this which you should refer. [javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts ](https://cqdump.wordpress.com/2015/11/02/aem-anti-pattern-long-running-sessions/) – Rashid Nov 20 '19 at 22:05

2 Answers2

0

This can happen when you maintain long-running JCR sessions. It seems a resource was modified by two concurrent sessions, hence the conflict.

You can inspect the AEM error log to see what caused the conflict. The error tells you what resource modification was attempted.

For more information, see the AEM documentation

As for how this can be resolved, it largely depends on the kind of resource and the sessions that modify it.

toniedzwiedz
  • 17,895
  • 9
  • 86
  • 131
0

use session.refresh(true) before saving your changes

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Suresh Gupta
  • 605
  • 7
  • 4