dbms_java.grant_Permissio 使用/ORA-29532

zhulch發表於2007-07-04
................[@more@]

專案中,要用到一個上傳文件的功能,用一個orcale的的儲存過程去呼叫 java 類,再由java類呼叫系統指指令,但始終報一個這樣的錯誤 dbms_java.grant_Permissio('SCOTT','java.io.FilePermission','/tmp/inbound/**','read,write,execute,delete');
ORA-29532: Java call terminated by uncaught Java exception:
oracle.aurora.vm.IdNotFoundException: my_user is not a user or role,
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.SecurityException: policy table update SYS:java.io.FilePermission,
'/tmp/inbound/*

解決方法:

call dbms_java.grant_permission( 'TEST', 'SYS:java.io.FilePermission', '/tmp/inbound/*', 'read, write' );

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7318139/viewspace-923833/,如需轉載,請註明出處,否則將追究法律責任。

相關文章