Getting Error : Illegal attempt to access class 'java.io.DataInputStream' via script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 07:37 PM
I'm getting an error "Illegal attempt to access class 'java.io.DataInputStream' via script" while submitting a catalog item in the portal. The catalog item is in the global scope.
Below is the error i'm getting from logs :
Evaluator.evaluateString() problem: java.lang.SecurityException: Illegal attempt to access class 'java.io.DataInputStream' via script: com.glide.sys.security.GlideSecurityChecks.throwSecurityException(GlideSecurityChecks.java:118)
com.glide.sys.security.GlideSecurityChecks.checkVisibilityToScripts(GlideSecurityChecks.java:112)
org.mozilla.javascript.NativeJavaPackage.getPkgProperty(NativeJavaPackage.java:127)
org.mozilla.javascript.NativeJavaPackage.get(NativeJavaPackage.java:83)
org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2097)
org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1569)
org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1562)
org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1271)
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:830)
org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:160)
Not sure why this is happening. Started getting this error after deploying changes in client scripts. The change in the client script is to do some validation checks on change of a variable in a variable set.
Please let me know if anyone has faced this issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 07:52 PM
Hi, unfortunately details of the error do not help much with diagnostics.
Can you provide your script in plain text so that it can be reviewed\evaluated?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 11:06 PM
Thanks for replying. The issue got fixed as it was due to some other changes in the instance that replaces the java packages with Service now objects. There was one BR that was not replaced and hence it was throwing this security error to access the package.