Get "Invalid path" with UTL_FILE.Fopen
Posted on 2006-06-07
I've spent about an hour chasing the various threads related to the UTL_FILE package with no success. Here's what I have so far:
I'm running Oracle 8.1 on an IBM RS/6000 box running AIX 5.2 (IBM's version of Unix)
the UTL_FILE_DIR value for the currently running instance is "/tmp/work_file"
the permissions on the directory /tmp/work_file are 777 (wide open access)
I have a subdirectory under /tmp/work_file called "image"
the permissions on "image" are 777
I have a file in image called "in_page_db.txt"
the permissions on this file are 666 (read/write, anybody)
the full path is "/tmp/work_file/image/in_page_db.txt"
I'm using the following PL/SQL:
CREATE OR REPLACE PACKAGE BODY AML_IMAGE AS
/* post_pages: update IMG_AML with data in /tmp/workfile/image/in_page_db.txt */
/* open the file */
fp := UTL_FILE.Fopen('image', 'in_page_db.txt', 'r');
WHEN NO_DATA_FOUND THEN
WHEN UTL_FILE.INVALID_PATH THEN
WHEN UTL_FILE.INVALID_MODE THEN
WHEN UTL_FILE.INVALID_OPERATION THEN
It compiles successfully and runs. It produces the following output:
I've checked everything I know to check. I believe I'm overlooking something REALLY trivial. Please look it over and let me know what you think I'm doing wrong.