ERROR main org.apache.bsf.BSFManager:451 - Exception: java.security.PrivilegedActionException: null

Which IIQ version are you inquiring about?

IIQ 8.4

Please share any other relevant files that may be required (for example, logs).

The code I am running is very basic as below. The error is coming for any rule that I am running from iiq-console.
import java.util.;
import sailpoint.object.
;
import org.apache.commons.logging.LogFactory;

String identityname = "sp\demo.user1";
Identity identity = context.getObjectByName(Identity.class, identityname);
System.out.println("Your name is : " + identity);

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

When running the above simple code, getting the error as below:
2025-07-23T00:47:03,397 ERROR main org.apache.bsf.BSFManager:451 - Exception:
java.security.PrivilegedActionException: null
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
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.server.SailPointConsole.cmdRule(SailPointConsole.java:3827) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at sailpoint.tools.Console.callMethod(Console.java:908) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.executeCommand(Console.java:643) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.doCommand(Console.java:586) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.interactiveCommand(Console.java:454) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.interactiveConsole(Console.java:394) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.run(Console.java:92) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.SailPointConsole.run(SailPointConsole.java:684) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.SailPointConsole.main(SailPointConsole.java:600) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at sailpoint.launch.Launcher.main(Launcher.java:250) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
Caused by: org.apache.bsf.BSFException: BeanShell script error: bsh.ParseException: Parse error at line 7, column 61. Encountered: ( BSF info: Test at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(BeanShellBSFEngine.java:202) ~[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:?]
… 24 more
sailpoint.tools.GeneralException: BeanShell script error: bsh.ParseException: Parse error at line 7, column 61. Encountered: ( BSF info: Test at line: 0 column: columnNo
2025-07-23T00:47:03,425 ERROR main sailpoint.tools.Console:594 - BeanShell script error: bsh.ParseException: Parse error at line 7, column 61. Encountered: ( BSF info: Test at line: 0 column: columnNo
sailpoint.tools.GeneralException: BeanShell script error: bsh.ParseException: Parse error at line 7, column 61. Encountered: ( BSF info: Test 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.server.SailPointConsole.cmdRule(SailPointConsole.java:3827) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at sailpoint.tools.Console.callMethod(Console.java:908) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.executeCommand(Console.java:643) ~[identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.doCommand(Console.java:586) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.interactiveCommand(Console.java:454) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.interactiveConsole(Console.java:394) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.tools.Console.run(Console.java:92) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.SailPointConsole.run(SailPointConsole.java:684) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at sailpoint.server.SailPointConsole.main(SailPointConsole.java:600) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at sailpoint.launch.Launcher.main(Launcher.java:250) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
Caused by: org.apache.bsf.BSFException: BeanShell script error: bsh.ParseException: Parse error at line 7, column 61. Encountered: ( BSF info: Test at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(BeanShellBSFEngine.java:202) ~[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(Native Method) ~[?:?]
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]
… 20 more

Hello @spkhan

Welcome to the community!

Use String identityname = "sp\\demo.user1";
Backslashes must be escaped in Java string literals.

Or you can always put your code within

<![CDATA[your_code]]>

It prevents XML parsers from misinterpreting special characters and parse accordingly

Hi @jainanimesh,

Thank you for your response.

I have modified my code as below.

<?xml version='1.0' encoding='UTF-8'?>


<![CDATA[
import java.util.*;
import sailpoint.object.*;
import org.apache.commons.logging.LogFactory;


String identityname = "sp\demo.user1";
Identity identity = context.getObjectByName(Identity.class, identityname);
System.out.println("Your name is : " + identity);

]]>
</Source>

But still getting the same error.
2025-07-23T10:49:07,056 ERROR main org.apache.bsf.BSFManager:451 - Exception:
java.security.PrivilegedActionException: null
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
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.server.SailPointConsole.cmdRule(SailPointConsole.java:3827) [identityiq.jar:8.4 Build bdd0ed4de58-20230919-192552]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

Hello @spkhan If you’re using Windows-style user names like sp\demo.user1, escape it like:
String identityname = "sp\\\\demo.user1";

because Java interprets \\ as a single \.

2 Likes

Thank you so much @santhirajumunganda