Falied to Lazily Initialize a collection of Roles

Hi all,

I have create a New role and while requesting I am getting the below error:

An unexpected error occurred: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

Any ideas?

Hi @rishavghoshacc,

can you share more about the role and the application?
Do you assing some entitlement?
On which type application?

@enistri_devo
Can you share more about the role and the application? - It is a new type of role that I have created to assign capabilities to identities
Do you assign some entitlement? - We are assigning a capability through the role
On which type application? - No application

Do you a reference of a rule on this role?
Check on debug page

@enistri_devo There are no rules in the Role. Checked in Debug XML also

1 Like

@enistri_devo Any idea what it might be?

the error refers to a reference of a rule, so, I can suggest ot you to revise all the object involved on the process like role, capability, population ecc…

Try to run the rule on this topic to detect if you have something wrong on IDX values.

Hello @rishavghoshacc

This exception occurs when you try to access a lazy-loaded association outside the scope of the session that fetched it.

For more details and debugging this issue, you can set trace level to org.hibernate class.
Please set trace level to org.hibernate in log4 file and share the logs

Most common case for this to happen is that you load an object, then commit the transaction and lateron try to fetch a multi valued property of the object. Sometimes the commit might be buried in the sailpoint code like in the provisioner.

In such cases the simple fix is to reload the object from the db.

Something like:

identity = context.getObjectByName(Identity.class, identity.getName());

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.