LazyInitializationException : sailpoint.object.Rule.referencedRules

Which IIQ version are you inquiring about?

8.4p2

Share all details about your problem, including any error messages you may have received.

Hi All , we are getting LazyIntializationException “failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session“ across environment since last couple of days .

It is originating from Aggregation and Refresh Tasks . It is not throwing for any particular application , basically number of aggregations are failing because of this error.

Points to Consider -

  1. If we restart the service , it will get fixed for couple of days and will reappear again .
  2. We tried to debug by enabling multiple logs like aggregator , IdentityRefreshExecutor , Identitizer , bsfRuleRunner etc . We did not see any code related error on any rule or in any process.
  3. It seems , it is failing basically during promoteAttribute method of identitizer class . Even it is failing for those applications , where in identity mapping there is no reference available for that application.
  4. We have already verified the aggregation rules for application which are failing for Decache etc.

Below is the error -

sailpoint.tools.GeneralException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session
at sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunner.java:226)
at sailpoint.server.InternalContext.runRule(InternalContext.java:1315)
at sailpoint.server.InternalContext.runRule(InternalContext.java:1287)
at sailpoint.api.Identitizer.promoteAttribute(Identitizer.java:3963)
at sailpoint.api.Identitizer.promoteAttributes(Identitizer.java:3773)
at sailpoint.api.Identitizer.refresh(Identitizer.java:2325)
at sailpoint.api.Aggregator.finishLastIdentity(Aggregator.java:4822)
at sailpoint.api.Aggregator.aggregateAccount(Aggregator.java:3710)
at sailpoint.api.Aggregator.aggregateAccounts(Aggregator.java:3401)
at sailpoint.api.Aggregator.primaryAccountAggregation(Aggregator.java:2985)
at sailpoint.api.Aggregator.aggregateApplication(Aggregator.java:2833)
at sailpoint.api.Aggregator.phaseAggregate(Aggregator.java:2703)
at sailpoint.api.Aggregator.execute(Aggregator.java:2200)
at sailpoint.task.ResourceIdentityScan.doUnpartitioned(ResourceIdentityScan.java:251)
at sailpoint.task.ResourceIdentityScan.execute(ResourceIdentityScan.java:231)
at sailpoint.api.TaskManager.runSync(TaskManager.java:981)
at sailpoint.api.TaskManager.runSync(TaskManager.java:764)
at sailpoint.scheduler.JobAdapter.execute(JobAdapter.java:128)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:606)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218)
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:585)
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:149)
at org.hibernate.collection.internal.PersistentList.iterator(PersistentList.java:155)
at sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunner.java:204)
… 19 more

From Aggregator Class -

sailpoint.api.Aggregator:1916 - Exception during aggregation of Test User. Reason: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:606) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:585) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:149) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.collection.internal.PersistentList.hashCode(PersistentList.java:506) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at sailpoint.object.Rule.hashCode(Rule.java:416) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at java.util.WeakHashMap.hash(WeakHashMap.java:298) ~[?:?]
at java.util.WeakHashMap.put(WeakHashMap.java:450) ~[?:?]
at org.apache.commons.lang3.builder.ToStringStyle.register(ToStringStyle.java:225) ~[commons-lang3-3.12.0.jar:3.12.0]
at org.apache.commons.lang3.builder.ToStringStyle.appendClassName(ToStringStyle.java:1477) ~[commons-lang3-3.12.0.jar:3.12.0]
at org.apache.commons.lang3.builder.ToStringStyle.appendStart(ToStringStyle.java:410) ~[commons-lang3-3.12.0.jar:3.12.0]
at org.apache.commons.lang3.builder.ToStringBuilder.(ToStringBuilder.java:260) ~[commons-lang3-3.12.0.jar:3.12.0]
at org.apache.commons.lang3.builder.ToStringBuilder.(ToStringBuilder.java:223) ~[commons-lang3-3.12.0.jar:3.12.0]
at sailpoint.object.SailPointObject.toString(SailPointObject.java:1402) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at java.lang.String.valueOf(String.java:2951) ~[?:?]
at sailpoint.tools.TracingAspect.isSensitive(TracingAspect.java:466) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.tools.TracingAspect.filterValue(TracingAspect.java:406) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.tools.TracingAspect.filterValue(TracingAspect.java:380) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.tools.TracingAspect.processStandardParams(TracingAspect.java:255) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.tools.TracingAspect.entryMsg(TracingAspect.java:217) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.tools.TracingAspect.traceMethodEntry(TracingAspect.java:138) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunner.java:165) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1315) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1287) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Identitizer.promoteAttribute(Identitizer.java:3963) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Identitizer.promoteAttributes(Identitizer.java:3773) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Identitizer.refresh(Identitizer.java:2325) ~[identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Aggregator.finishLastIdentity(Aggregator.java:4822) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Aggregator.aggregateAccounts(Aggregator.java:3514) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Aggregator.primaryAccountAggregation(Aggregator.java:2985) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Aggregator.aggregateApplication(Aggregator.java:2833) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Aggregator.phaseAggregate(Aggregator.java:2703) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.Aggregator.execute(Aggregator.java:2200) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.task.ResourceIdentityScan.doUnpartitioned(ResourceIdentityScan.java:251) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.task.ResourceIdentityScan.execute(ResourceIdentityScan.java:231) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.api.TaskManager.runSync(TaskManager.java:981) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.request.TaskExecuteExecutor.execute(TaskExecuteExecutor.java:161) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]
at sailpoint.request.RequestHandler.run(RequestHandler.java:163) [identityiq.jar:8.4p2 Build a559eb467b2-20241211-210440]

Hey @harsh_gupta4 !

Failed to lazily initialized is an old popular error for IIQ. Most often people get this in rules and workflows by persisting sailpoint.objects (usually identity) in rules or between workflows rather than passing a name or Id and only calling the object when you need it.

For example you have a workflow variable for the whole “identity” object rather than one for the identityName. You should not do this. Instead pass the identityName and only call the whole object in steps where you need it.

My guess would be that your aggregation or more likely identity refresh is launching a workflow that has one of these bad programming paradigms in it. It can be a large pain to track down because a refresh task for instance may launch many workflows and it’s hard to know exactly which one it might be coming from. If it is causing the task to fail outright then it’s best to trace the log and see if a workflow or rule was running right when it failed.

If you check the old communities.sailpoint.com you will find dozens of threads on this topic. Here are a few:

https://community.sailpoint.com/t5/IdentityIQ-Forum/Failed-to-lazily-initialize-a-collection-of-role-sailpoint/m-p/91280

https://community.sailpoint.com/t5/IdentityIQ-Forum/An-unexpected-error-occurred-failed-to-lazily-initialize-a/m-p/41199

https://community.sailpoint.com/t5/IdentityIQ-Forum/Workflow-error-failed-to-lazily-initialize-a-collection-of-role/m-p/208045

In case you didn’t know you have to sign in with your community account to view those threads on the old forum.

Thanks @kyle_knox . Already verified above mentioned Links . If that is the issue , after service restart it should not fix then reappear after 2 weeks .

BTW already verified Refresh Workflow etc .

Hey @harsh_gupta4 ok one other thing to check. A long time back in like IIQ 8.2 I believe there was a known issue where calling sailpoint.api.aggregator from an after provisioning rule would always throw the lazily initialize and fail. This was not an issue before but popped up at some point in the 8.x releases.

The client had all of these after provisioning rules that would call aggregator manually to do a targeted aggregation after provisioning.

Apart from that I’m not sure what the issue might be. Cheers!

We are suspecting memory leak because of the circular lock in one of the process . We have put fix .For now Monitoring it .

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