Error Description:
User was facing issue in accessing below file due to the java error.Java Error: 4: java.security.AccessControlException: the Permission (java.io.FilePermission file_name read) has not been granted
Solution:
First check whether user has java permissions to access this file to execute.
SQL> select * from USER_JAVA_POLICY where grantee_name = 'USER_NAME';
no rows selected
SQL > execute dbms_java.grant_permission( 'USER_NAME', 'SYS:java.io.FilePermission', '/bin/gt', 'execute' );
Again check the Java permissions on the user to this file.
SQL> select * from USER_JAVA_POLICY where grantee_name = 'USER_NAME';
KIND GRANTEE
TYPE_SCHEM
TYPE_NAME
NAME
ACTION ENABLED
SEQ
-------- ---------- ---------- ----------------------- ---------- ------------
-------- ----------
GRANT USER_NAME SYS java.io.FilePermission
/bin/gt execute
ENABLED 181
$pwd
/bin
$ls -ltr gt
-r-sr-xr-x 1 root bin 80876 Feb 15 2007 gt
$file gt
gt: ELF-32 executable object file - IA64
Thanks for reading this post ! Please comment if you like this post ! Click on FOLLOW to get next blog updates !
Good analysis..
ReplyDelete