Help: File access from Java stored procedure (Oracle)

From: <tony_p_nospam_at_ix.netcom.com>
Date: 10 Apr 2001 13:16:23 GMT
Message-ID: <9av137$631$1_at_news.netmar.com>


Greetings,

I need to write a Java stored procedure in Oracle that writes out a file. Oracle JServer documentation indicates that this is possible if I grant correct permissions in the right places. So far, I have done the following:

  1. Wrote the stored procedure and loaded it successfully using loadjava
    (as myself)
  2. Created the stored procedure successfully by using "as language java" clause (also as myself)
  3. Granted myself the java.io.FilePermission permission on everything in my home account by calling grant_permission (also as myself), with action of both "read" and "write"

However, when I call the stored procedure using the SQL CALL statement, I get the following error message:

ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission
(java.io.FilePermission filename write) has not been granted by
dms_java.grant_permission to
SchemaProtectionDomain(USERID|PolicyTableProxy(USERID))

Where "filename" is the absolute pathname of the file I am trying to write (new file, does not exist yet) and USERID is my Oracle user ID.

Could someone advise what else I need to set up, grant, etc.? Any help would be tremendously appreciated. The Oracle version is 8.1.7 and the operating system is Solaris 2.6. My Oracle account has DBA privileges.

Thank you very much in advance.

Regards,
Tony Pisarenkov
BNA, Inc.

  • Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web ----- http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups NewsOne.Net prohibits users from posting spam. If this or other posts made through NewsOne.Net violate posting guidelines, email abuse_at_newsone.net
Received on Tue Apr 10 2001 - 15:16:23 CEST

Original text of this message