Java File Permissions [message #92031] |
Tue, 10 February 2004 01:23 |
Scott Cowan
Messages: 15 Registered: February 2004
|
Junior Member |
|
|
Folks,
I have a problem accessing files on the network.
I've written a wee java class, invoked through pl/sql that copies files from one folder to another, ie using these parameters
c:test1test.txt --[>] c:test2test.txt (cool)
However when I try to copy from a network drive
f:test.txt --[>] c:test2test.txt , i receive this error
java.io.FileNotFoundException: No such file or directory
at java.io.FileInputStream.open(FileInputStream.java)
at java.io.FileInputStream.<init>(FileInputStream.java:64)
at UPLOAD.FileCopy(UPLOAD.java:27)
I read some earlier notes and tried granting using these grants
EXEC Dbms_Java.Grant_Permission('BATCH', 'java.io.FilePermission', 'F:TEST.TXT', 'read ,write, execute, delete');
EXEC DBMS_JAVA.GRANT_PERMISSION('BATCH', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
EXEC DBMS_JAVA.GRANT_PERMISSION('BATCH', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
GRANT JAVAUSERPRIV TO BATCH;
but to no avail .
What would you suggest to remedy this ??
Thanks in advance
Scott
|
|
|
Re: Java File Permissions [message #92166 is a reply to message #92031] |
Wed, 31 March 2004 01:16 |
George Gaviotis
Messages: 1 Registered: March 2004
|
Junior Member |
|
|
Scott,
The user defined in oracle service as LogOnAs does not have network permissions. Change the LogOnAs in the services for the oracle db service to a user that has network permission. You will need to do the same for the oracle listener service.
Hope that helps.
George.
|
|
|