Getting error message Ilegal attempt to access class 'com.glide.util.StringUtil' via script

Kim Kronborg
Kilo Expert

Hello,

A couple of days ago I installed the PowerShell Utility and it worked fine in the beginning. But now I get the error message 'Illegal attempt to access com.glide.util.StringUtil via script' everytime I try to use the Powershell Utility.

How can I debug where this error message is coming from ?

11 REPLIES 11

Karl Dietrich
Kilo Sage

Hello there again,

as a little addition to my previous answer I will give a short explanation why you get the error message 'Illegal attempt to access com.glide.util.StringUtil via script'. The old Update Set was working with PackageCalls but ServiceNow has bocked those PackageCalls for security reasosns.

ServiceNow provides a tool to find those PackageCalls.

 

https://docs.servicenow.com/bundle/london-application-development/page/script/general-scripting/concept/c_PackagesCallRemovalTool.html

Hello Karl,

I am getting the “Illegal attempt to access class ‘com.glide.util’ via script” error when trying to execute the below statement.
Get-ADUser -Filter * -SearchBase “CN=Users,DC=xxxxxxx,DC=com”

I have my midserver installed and i am able to execute the above statement from my midserver that returns all the AD users.

I tried this using the Kingston version and also modified the script includes and UI Pages to use “GlideStringUtil” instead of “Packages.com.glide.util.StringUtil” as mentioned by Sébastien L in this article.

I even activated the plugin com.glide.script.packages_call_removal as mentioned, still no luck.

Any help would be appreciated.