Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.security.AccessControlException in Java stored procedure

gibboApr 1 2025 — edited Apr 1 2025

I am getting java.security.AccessControlException: the Permission ("java.lang.RuntimePermission" "getenv.USER") has not been granted to FPSAPP even though FPSAPP has has correct permission in DBA_JAVA_POLICY view:

I have tried to execute call dbms_java.grant_permission( 'FPSAPP', 'SYS:java.lang.RuntimePermission', 'getenv.USER', '' ); both as an ordinary database user with JAVA_ADMIN role as well as “connect / as sysdba”. None of them works.

Also, there are no “RESTRICT” entries in USER_JAVA_POLICY view that disable the grant. Entire content of that view for user FPSAPP is:

Is there something obvious I am missing?

Thank´s in advance!

Comments
Post Details
Added on Apr 1 2025
0 comments
112 views