DBMS_JAVA.GRANT_PERMISSION 'SYS:JAVA.NET.SOCKETPERMISSION' has not been granted (Doc ID 1082251.1)

Last updated on JUNE 22, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 22-Jun-2017***

Symptoms

Executing a java stored procedure (JSP) may fail with:

Exception -->java.security.AccessControlException:
the Permission (java.net.SocketPermission <hostname.net> resolve) has not been granted to PKRISHNAN.
The PL/SQL to grant this is dbms_java.grant_permission( '<schema>','SYS:java.net.SocketPermission', 'siebeldev.emdeon.net', 'resolve' )

Executing the following to assign the permission to the user results in the same exception.

SQL> exec dbms_java.grant_permission( '<SCHEMA>','SYS:java.net.SocketPermission', '<HOSTNAME>', 'resolve,connect');

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms