Full Identity Refresh Task Fails with Below Errors

Hi All,

We are encountering two distinct errors during the execution of the Identity Refresh task:

  1. LazyInitializationException:

    • Error: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Identity.capabilities
  2. 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]

Please suggest

Hi @aniketnegi ,

Could you run Identity refresh task with limited Identities (for users who are assigned with Role)

Also, check Role and Identity in debug page if something doesn’t look correct like acquired by lock or assignment references, etc.

This might give specific error and help for debugging.

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 article goes into this issue more in depth with some examples and causes for these errors: Support Articles - Decaching | Common Causes, Tips, and Tricks - Customer Support

This post was answered by a Palyrian Solutions Architect. Feel free to message me directly if your problem requires a deeper dive.
:globe_with_meridians: palyrian.com | :telephone_receiver: ‪(301) 284-8124‬

1 Like

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

@aniketnegi You might want to check few things:

  • 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.

Please also refer to the document: https://community.sailpoint.com/t5/IdentityIQ-Forum/Request-for-Official-Guidance-Use-of-commitTransaction-Inside/m-p/277486/highlight/true#M198717

Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(:heart:,:+1:, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.