Re: java.io.FileNotFoundException: Permission denied Exception

From: Adam Hapworth <hap_at_mikomi.org>
Date: 28 Aug 2002 15:28:32 -0700
Message-ID: <a6cb04db.0208281428.13489b6d_at_posting.google.com>


sivaprasad_sreenivasan_at_non.hp.com (siva) wrote in message news:<d1f7fb68.0208280551.56704c10_at_posting.google.com>...
> I get the above exception while I try to run a Java Stored procedure
> on Oracle DataBase.
> No exception is thrown when the application is "loaded" into the
> DataBase.The exception is thrown when the application is run.
> The exception is thrown when the program tries to fetch a particular
> file(a properties file). Infact I have set the read,write and even
> execute 'action' with java.io.FilePermission for this particular file
> in the DataBase.But still the following exception is thrown
>
> java.io.FileNotFoundException: Permission denied
> at java.io.FileInputStream.open(FileInputStream.java)
> at java.io.FileInputStream.<init>(FileInputStream.java)
>
> Could anybody help me on this please??
>
> Cheers
> Sivan

What is the OS that you are running. I had a problem when I was first playing with things like this because the file on a Unix machine did not have proper permissions. It needed to have the same user or group permissions that mathced the running Database. Also did you set the dbms_java.grant_permissions. Example from asktom http://asktom.oracle.com/pls/ask/f?p=4950:8:1224200::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:952229840241,%7Bjava%7D%20and%20%7Bunix%7D  sys_at_DEV816> begin

  2      dbms_java.grant_permission
  3      ('RT_TEST',
  4       'java.io.FilePermission',
  5       '/usr/bin/ps',
  6       'execute');

  7 end;
  8/

If not then that should help.

Adam Received on Thu Aug 29 2002 - 00:28:32 CEST

Original text of this message