Home » Developer & Programmer » JDeveloper, Java & XML » java.security.AccessControlException - the Permission has not been granted (Oracle 10G)
java.security.AccessControlException - the Permission has not been granted [message #343792] Thu, 28 August 2008 03:17
Messages: 1
Registered: August 2008
Junior Member

Please help, I am getting the following error and have tried what has been suggested, but it doesn't work.

java.security.AccessControlException: the Permission (java.net.SocketPermission ....... connect,resolve) has not been granted to ......

The PS/SQL to grant this is dbms_java.grantPermission(.....).

Code is as follows:

Java Code:

create or replace and compile java source named getdriver as
import java.sql.*;
import oracle.jdbc.driver.*;

class JDBCVersion
public JDBCVersion()


public static void main (String args[])
throws SQLException
// Load the Oracle JDBC driver
(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection

// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();

// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());

create or replace package cara_getdriver_pack is

PROCEDURE cara_get_driver (endResult IN OUT VARCHAR2);

end cara_getdriver_pack;

create or replace package body cara_getdriver_pack as
PROCEDURE cara_get_driver(endResult IN OUT VARCHAR2)
language java
name 'JDBCVersion.main(java.lang.String[])';

end cara_getdriver_pack;

Procedure to call wrapper:
CREATE OR REPLACE PROCEDURE cara_output_getdriver
v_endresult varchar2(200);
dbms_output.put_line('driver is: '||v_endresult);
END cara_output_getdriver;

Actual call:begin
Previous Topic: inserting data finto table from a clob column
Next Topic: PLS-00307: too many declarations of 'INSERTXML' match this call
Goto Forum:

Current Time: Wed Oct 22 19:57:56 CDT 2014

Total time taken to generate the page: 0.08679 seconds