Problem
ADF application has view object containing bind variable based on groovy expression. The latter tries to access ADF security context. On compilation I get static type checking error:
[Static type checking] – [ADF security error] Accessing the securityContext property on class oracle.adf.share.ADFContext is not permitted.
Possible solution
You need to switch definition type of groovy expression. Move it from external file based (*.bcs) to inline mode. As far as I’ve noticed groovy expression external file based definition came into scene with ADF 12c. So this is like moving backwards, but it solves problem.
This kind of definition:
Note: TestView refers to file TestView.bcs, where groovy script is saved.
It needs to be replaced with:
Related post – JBO-25186: Exception in expression “bindVariableName” of unknown type : oracle.jbo.ExprSecurityException. What can be the reason?
ADF Version 12.2.1.0.0
Remove trustMode=”untrusted” from the Transientexpression to fix the issue.
Thank you Paresh!
You are right. It would be a better option.