Error, ORA-01031: insufficient privileges is displayed, when trying to create the server side objects to be able to use the trace file browser to open trace files from the server.
What privileges are required without granting the DBMS_JAVA role?
User must be able to CREATE TABLE and CREATE PROCEDURE
And then granting read access on the directory holding the trace files.
If you don't want to give out the java_admin role to a user, give them permission to be able to grant and revoke java file permissions by issuing the following statement as SYS user:
begin
dbms_java.grant_policy_permission('USER_RUNNING_TRACE_BROWSER', 'SYS', 'java.io.FilePermission', '*');
end