Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> dbms_java.grant_permission
create or replace procedure two(id number)
AS LANGUAGE JAVA
NAME 'Receive.two(int) ';
/
create or replace procedure reciveidandsend
AS LANGUAGE JAVA
NAME 'Receive.reciveidandsend() ';
/
public class Receive {
static Socket []mysocket = new Socket[20];
static DataOutputStream []D = new DataOutputStream[20];
static int i=0;
public static void reciveidandsend () throws IOException,
IllegalArgumentException,SecurityException,EOFException {
InetAddress I = null; I= I.getByName(null); int PortNumber =5342;
}
}
public static void two(int x)throws IOException{
for(int a=0;a<i;a++)
{
D[a].writeInt(x);
}
}
}
i have written two procedures which call this java class Receive
1) to open server socket
2) to send information to clients
but when i am executing i am getting error
java.security.AccessControlException: the Permission
(java.net.SocketPermission
143.43.209.12:34066 accept,resolve) has not been granted to CS522S8.
The PL/SQL
to grant this is dbms_java.grant_permission( 'CS522S8',
'SYS:java.net.SocketPermission', '143.43.209.12:34066',
'accept,resolve' )
ORA-06512: at "CS522S8.RECIVEIDANDSEND", line 1
ORA-06512: at line 1
it is reading wrong port number 34066 but i gave 5342 when i am executing it is giving other portnumber
and i also got the grant permission on this port number5342 can any
one give suggestion on this
thank you very much
Received on Wed Apr 19 2006 - 23:32:57 CDT