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?
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?
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.
use
session.refresh(true)
before saving your changes