This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes File Permission error while calling java Stored Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "File Permission error while calling java Stored Procedure" Watch "File Permission error while calling java Stored Procedure" New topic
Author

File Permission error while calling java Stored Procedure

dhaval tamboli
Greenhorn

Joined: Aug 02, 2010
Posts: 25
Hi Guys,

May be I am making stupid fundamental mistake, but I am not able to figure out, what!!

Let me tel you briefly, What I am trying to do.

I loaded few jar files to oracle using loadjava and created one java class, to call one class(which is in jar file) and get the result.
now, that class(jar one) calls one file on disk (which is hardcoded) and depending on that it performs operation.

Firstly, I got this error (which is expected).



After that I gave grant using



so now, it should work, but now I am getting this error



Actually, It's not able to find file, but I am 100% sure I have provided right file name and path.
So I am not sure why this error!!

By the way, my oracle is at /opt/oracle11

I am not sure, what I am doing regarding giving grant is correct or not, but I verified grant by
And I can see it's enabled..

Let me know, if i am wrong somewhere

Thanks
dhaval tamboli
Greenhorn

Joined: Aug 02, 2010
Posts: 25
Disregrad dbuser in giving grants.
I used ORIGDV85B only
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

You probably have this right, but just for sure: does the directory you're trying to access reside on the same machine as the database server?
Database procedures (including Java) cannot access directories and files stored on client machine.
dhaval tamboli
Greenhorn

Joined: Aug 02, 2010
Posts: 25
you are right, that file was on client machine. I added it on database server.

Thanks
 
wood burning stoves
 
subject: File Permission error while calling java Stored Procedure