We are encountering two distinct errors during the execution of the Identity Refresh task:
LazyInitializationException:
Error:org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Identity.capabilities
NonUniqueObjectException (Duplicate Identifier):
Error:A different object with the same identifier value was already associated with the session
Errors as below:
An unexpected error occurred: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Identity.capabilities, could not initialize proxy - no Session
A different object with the same identifier value was already associated with the session : [sailpoint.object.Link#2c98d6037431873401748d7ee72d7f45]
A different object with the same identifier value was already associated with the session : [sailpoint.object.Bundle#ac18568385ef1b5381865a1ec67a5620]
A different object with the same identifier value was already associated with the session : [sailpoint.object.Link#ac18568281011d20818150de24d16f9f]
Hi @aniketnegi - these errors typically indicate a customization issue rather than a simple product configuration problem.
The LazyInitializationException and the NonUniqueObjectException error are commonly seen when custom rules or workflows retain full SailPoint/Hibernate objects such as Identities/Links/Bundles/etc or when context.decache() is used incorrectly.
I’d recommend reviewing your custom rules, workflows, or any custom logic initiated by your refresh task. Please look for:
storing full SailPoint objects in workflow variables, WorkflowCase, or other persisted state instead of storing only the object ID or name
loading or updating the same Link, Bundle, or Identity multiple times within the same Hibernate session
calling context.decache() too early, too broadly, or on objects that are still needed later in the transaction
This post was answered by a Palyrian Solutions Architect. Feel free to message me directly if your problem requires a deeper dive. palyrian.com | ‪(301) 284-8124‬
Is it ootb refresh task you are running or created the custom refresh task, check in your code if you are using “context.decache()” from your rule, it should resolved the .LazyInitializationException: error
If you are passing any identity and application object completely as arguments to any custom method. Modify it to pass the names and get the object from context inside the method.
If you are doing commitTransaction(), that may also invalidate some of the objects in reference.. For this you should create a sub context and then make the changes followed by commitTransaction().
If you are decache(), that also may cause the issue. Please change it to decache(object).
Please check your codebase for such cases and make the necessary adjustments.
Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(,, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.