We are trying to connect DB2 for i Database (formerly known as an AS/400) from a Java Stored Procedure. We are getting the following message:

To PL/SQL to grant this is dbms_java.grant_permission('user', 'SYS:java.net.SocketPermission', 'xx.xx.xx.xx:xxxx', 'connect, resolve')

We have done this by:

exec dbms_java.grant_permission('user', 'SYS:java.net.SocketPermission', 'xx.xx.xx.xx:xxxx', 'connect, resolve');/commit;/

We created an ACL and added Privileges for the User. But we are still getting the same error. Any Suggestions?

有帮助吗?

解决方案

The Solution: 1- Remove all duplicate Records in JAVA$POLICY table. 2- Grant the permission for the user on the default Oracle port (1521)

exec dbms_java.grant_permission('user', 'SYS:java.net.SocketPermission', 'xx.xx.xx.xx:1521', 'connect, resolve');/commit;/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top