The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
March 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

RE: is it possible to read a text file in Java Stored Procedure

Posted by Steve Park on November 07, 2001 at 1:48 AM

> Hi!
> I am reading a text file over the n/w or in local m/c the preparing the batch out of thos data retrieved. and then inserting the records using batch update.

> This process is running fine from my Visual Age for Java or any other JDK environment.

> but when I successfully published the class to Oracle Server.
> No data gets inserted.

> If u have any answer to that please let me know.

Yes. Your oracle user needs to have the Javasyspriv role granted. If this doesn't work, you can grant the permission manually using the following command in SQL*Plus:

call dbms_java.grant_permission("java.io.FilePermission","","write");

If this still doesn't work you could scratch the Java Stored Procedure and use the UTL_TEXT package in PL/SQL.

Good Luck!

Steve





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us