Share all details about your problem, including any error messages you may have received.
Hi Sailors,
We are trying to update the extended attributes of Managed Attributes using a bean shell code by iterating through all the objects of a single type and we are facing the result set exception while running the code. I have followed all the suggestions mentioned, while using the iterator with caution and this issue is occurring after exactly updating 2100 objects. Sharing the loggers and source code for reference. Kindly help me out, if I am missing something.
Runtime Loggers:
2025-07-03T11:20:38,224 ERROR QuartzScheduler_Worker-4 sailpoint.task.RuleExecutor:166 - ---- > Both conditions Satisfied /subscriptions/e46e59b2-d9c5-4a1d-93f8-b306aadbbfc0/resourceGroups/NetworkWatcherRG:312a565d-c81f-4fd8-895a-4e21e48d571c
API Management Service Contributor [on] NetworkWatcherRG
2025-07-03T11:20:38,260 ERROR QuartzScheduler_Worker-4 sailpoint.task.RuleExecutor:166 - ## subCount :: 0
2025-07-03T11:20:38,272 ERROR QuartzScheduler_Worker-4 sailpoint.task.RuleExecutor:166 - ## bothCount :: 1049
2025-07-03T11:20:38,292 ERROR QuartzScheduler_Worker-4 sailpoint.task.RuleExecutor:166 - ## recordCounter :: 1049
2025-07-03T11:20:38,301 ERROR QuartzScheduler_Worker-4 sailpoint.task.RuleExecutor:166 - ---- > Both conditions Satisfied /subscriptions/e46e59b2-d9c5-4a1d-93f8-b306aadbbfc0/resourceGroups/NetworkWatcherRG:7f951dda-4ed3-4680-a7ca-43fe172d538d
AcrPull [on] NetworkWatcherRG
2025-07-03T11:20:38,308 ERROR QuartzScheduler_Worker-4 sailpoint.task.RuleExecutor:166 - here1
2025-07-03T11:20:38,364 WARN QuartzScheduler_Worker-4 engine.jdbc.spi.SqlExceptionHelper:137 - SQL Error: 8003, SQLState: S0001
2025-07-03T11:20:38,364 ERROR QuartzScheduler_Worker-4 engine.jdbc.spi.SqlExceptionHelper:142 - The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
2025-07-03T11:20:38,365 ERROR QuartzScheduler_Worker-4 org.apache.bsf.BSFManager:451 - Exception:
java.security.PrivilegedActionException: null
at java.security.AccessController.doPrivileged(AccessController.java:573) ~[?:?]
at org.apache.bsf.BSFManager.eval(BSFManager.java:442) [bsf.jar:?]
at sailpoint.server.BSFRuleRunner.eval(BSFRuleRunner.java:245) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunner.java:216) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1322) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1294) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.runRule(RuleExecutor.java:181) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.execute(RuleExecutor.java:121) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.TaskManager.runSync(TaskManager.java:981) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.TaskManager.runSync(TaskManager.java:764) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.scheduler.JobAdapter.execute(JobAdapter.java:128) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?]
Caused by: org.apache.bsf.BSFException: The application script threw an exception: java.lang.RuntimeException: sailpoint.tools.GeneralException: could not extract ResultSet BSF info: DPW_AzureRoleAssignments_Updation_Rule at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(BeanShellBSFEngine.java:197) ~[bsh-2.1.8.jar:2.1.8 2018-10-02 08:36:04]
at org.apache.bsf.BSFManager$5.run(BSFManager.java:445) ~[bsf.jar:?]
at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
... 12 more
2025-07-03T11:20:38,379 ERROR QuartzScheduler_Worker-4 sailpoint.api.TaskManager:1007 - Exception: [sailpoint.tools.GeneralException: The application script threw an exception: java.lang.RuntimeException: sailpoint.tools.GeneralException: could not extract ResultSet BSF info: DPW_AzureRoleAssignments_Updation_Rule at line: 0 column: columnNo]
java.lang.Exception: sailpoint.tools.GeneralException: The application script threw an exception: java.lang.RuntimeException: sailpoint.tools.GeneralException: could not extract ResultSet BSF info: DPW_AzureRoleAssignments_Updation_Rule at line: 0 column: columnNo
at sailpoint.task.RuleExecutor.execute(RuleExecutor.java:133) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.TaskManager.runSync(TaskManager.java:981) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.TaskManager.runSync(TaskManager.java:764) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.scheduler.JobAdapter.execute(JobAdapter.java:128) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?]
Caused by: sailpoint.tools.GeneralException: The application script threw an exception: java.lang.RuntimeException: sailpoint.tools.GeneralException: could not extract ResultSet BSF info: DPW_AzureRoleAssignments_Updation_Rule at line: 0 column: columnNo
at sailpoint.task.RuleExecutor.runRule(RuleExecutor.java:187) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.execute(RuleExecutor.java:121) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
... 5 more
Caused by: sailpoint.tools.GeneralException: The application script threw an exception: java.lang.RuntimeException: sailpoint.tools.GeneralException: could not extract ResultSet BSF info: DPW_AzureRoleAssignments_Updation_Rule at line: 0 column: columnNo
at sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunner.java:219) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1322) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1294) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.runRule(RuleExecutor.java:181) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.execute(RuleExecutor.java:121) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
... 5 more
Caused by: org.apache.bsf.BSFException: The application script threw an exception: java.lang.RuntimeException: sailpoint.tools.GeneralException: could not extract ResultSet BSF info: DPW_AzureRoleAssignments_Updation_Rule at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(BeanShellBSFEngine.java:197) ~[bsh-2.1.8.jar:2.1.8 2018-10-02 08:36:04]
at org.apache.bsf.BSFManager$5.run(BSFManager.java:445) ~[bsf.jar:?]
at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
at org.apache.bsf.BSFManager.eval(BSFManager.java:442) ~[bsf.jar:?]
at sailpoint.server.BSFRuleRunner.eval(BSFRuleRunner.java:245) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunner.java:216) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1322) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.runRule(InternalContext.java:1294) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.runRule(RuleExecutor.java:181) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.task.RuleExecutor.execute(RuleExecutor.java:121) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
... 5 more
Hi Move the QueryOptions ops = new QueryOptions(); inside the loop, so it gets re-initialized for each iteration. That way, each database query remains lightweight and isolated.Like i am sharing one code :
if(searchIndex != -1) {
int startIndex = searchIndex + searchWord.length();
int endIndex = maValue.indexOf("/resourceGroups");
subscriptionID = maValue.substring(startIndex, endIndex).trim();
log.info("here1");
// See this and Move QueryOptions inside the loop to avoid parameter buildup
QueryOptions ops = new QueryOptions();
Filter searchFilter = Filter.and(
Filter.eq("application.name", "Azure AD Global"),
Filter.eq("ManagedAttribute.value", subscriptionID)
);
ops.add(searchFilter);
IncrementalObjectIterator incIterator = new IncrementalObjectIterator(context, ManagedAttribute.class, ops);
while (incIterator.hasNext()) {
ManagedAttribute foundMA = incIterator.next();
subscription = foundMA.getDisplayName();
ma.setAttribute("azureSubscription", subscription);
context.decache(foundMA);
break;
}
sailpoint.tools.Util.flushIterator(incIterator);
}
Thanks, a lot. The code is working as expected now. As this is entitlements update, we would like to keep this rule in group refresh rule. The same code is working fine over iteration from rule runner task. However, when this rule is getting executed from group aggregation task. We are getting the below error:
2025-07-07T08:23:08,802 WARN QuartzScheduler_Worker-1 engine.jdbc.spi.SqlExceptionHelper:137 - SQL Error: 0, SQLState: null
2025-07-07T08:23:08,802 ERROR QuartzScheduler_Worker-1 engine.jdbc.spi.SqlExceptionHelper:142 - The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.
2025-07-07T08:23:08,803 ERROR QuartzScheduler_Worker-1 sailpoint.api.Correlator:1145 - Unable to correlate using filter [(application == sailpoint.object.Application@e8bf11e[id=0a300e0790bb1dfb8190bbd3d7b60135,name=Oracle Fusion ERP Cloud] && nativeIdentity i== "E7C674ACD3452C9DE0532D75E70A593F")]: could not extract ResultSet
sailpoint.tools.GeneralException: Unable to correlate using filter [(application == sailpoint.object.Application@e8bf11e[id=0a300e0790bb1dfb8190bbd3d7b60135,name=Oracle Fusion ERP Cloud] && nativeIdentity i== "E7C674ACD3452C9DE0532D75E70A593F")]: could not extract ResultSet
at sailpoint.api.Correlator.findOneObject(Correlator.java:1144) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.Correlator.findLink(Correlator.java:352) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.Correlator.findLinkByNativeIdentity(Correlator.java:295) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.Identitizer.getCurrentLink(Identitizer.java:5051) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
2025-07-07T08:23:09,911 ERROR QuartzScheduler_Worker-1 sailpoint.api.Aggregator:3185 - Exception during reconnect: Unable to rollback against JDBC Connection
sailpoint.tools.GeneralException: Unable to rollback against JDBC Connection
at sailpoint.persistence.HibernatePersistenceManager.close(HibernatePersistenceManager.java:671) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.persistence.HibernatePersistenceManager.reconnect(HibernatePersistenceManager.java:3352) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.persistence.ClassPersistenceManager.reconnect(ClassPersistenceManager.java:413) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.reconnect(InternalContext.java:1593) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
Caused by: org.hibernate.TransactionException: Unable to rollback against JDBC Connection
at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.rollback(AbstractLogicalConnectionImplementor.java:127) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.rollback(JdbcResourceLocalTransactionCoordinatorImpl.java:304) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.transaction.internal.TransactionImpl.rollback(TransactionImpl.java:142) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at sailpoint.persistence.HibernatePersistenceManager.close(HibernatePersistenceManager.java:661) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
... 17 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3876) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:4031) ~[mssql-jdbc-11.2.0.jre11.jar:?]
2025-07-07T08:23:09,949 ERROR QuartzScheduler_Worker-1 sailpoint.api.Aggregator:1916 - Exception during aggregation. Reason: Unable to rollback against JDBC Connection
sailpoint.tools.GeneralException: Unable to rollback against JDBC Connection
at sailpoint.persistence.HibernatePersistenceManager.close(HibernatePersistenceManager.java:671) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.persistence.HibernatePersistenceManager.reconnect(HibernatePersistenceManager.java:3352) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.persistence.ClassPersistenceManager.reconnect(ClassPersistenceManager.java:413) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.InternalContext.reconnect(InternalContext.java:1593) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.api.Aggregator.reconnect(Aggregator.java:3180) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3876) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:4031) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:4241) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:781) ~[commons-dbcp2-2.9.0.jar:2.9.0]
at org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:781) ~[commons-dbcp2-2.9.0.jar:2.9.0]
at sailpoint.persistence.ConnectionWrapper.rollback(ConnectionWrapper.java:191) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
2025-07-07T08:23:09,971 WARN QuartzScheduler_Worker-1 sailpoint.api.Aggregator:1924 - Deleted accounts were not processed due to errors during aggregation.
2025-07-07T08:23:09,971 WARN QuartzScheduler_Worker-1 apache.commons.dbcp2.BasicDataSource:58 - An internal object pool swallowed an Exception.
com.microsoft.sqlserver.jdbc.SQLServerException: The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3876) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:4031) ~[mssql-jdbc-11.2.0.jre11.jar:?]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:4241) ~[mssql-jdbc-11.2.0.jre11.jar:?]
Try commenting out this block and rerun group aggregation
IncrementalObjectIterator incIterator = new IncrementalObjectIterator(context, ManagedAttribute.class, ops);
Commenting out the block is not a permanent fix it’s a diagnostic step to confirm that your database query is the cause of the crash during Group Aggregation.
If aggregation is successful so DB query is causing the crash.