Launch a SQL*Plus session as SYS or SYSTEM, and execute the following commands:
-
To allow accessing properties:
exec dbms_java.grant_permission('M_SYS', 'java.util.PropertyPermission', '*', 'read, write');
-
To allow access to sockets:
exec dbms_java.grant_permission('M_SYS', 'java.net.SocketPermission', '*', 'connect, resolve');
To allow access to local files so that the emails are generated, read/write access is required for the content of the directory specified with DBA setting LOG_FILE_DEST (see DBA Settings).
For example, if your database server is a Windows machine and your LOG_FILE_DEST is set to D:\oradata\mydb\utl, execute:
exec dbms_java.grant_permission('M_SYS', 'java.io.FilePermission', 'D:\oradata\mydb\utl\*', 'read, write, delete');
Or, if your database server is a Unix machine with LOG_FILE_DEST pointing to /oradata/mydb/utl, the appropriate command is:
exec dbms_java.grant_permission('M_SYS', 'java.io.FilePermission', '/oradata/mydb/utl/*', 'read, write, delete');
The same applies to granting Java access to local files for PDB, for example, with respect to DBA setting PDB_REPORT_DEST_DB, be sure to modify path names appropriately so that they match your directories.