This discussion is archived
14 Replies Latest reply: Jan 28, 2011 10:59 AM by Srini Chavali-Oracle RSS

Error Message is ORA-22288: file or LOB operation GETLENGTH failed

R Newbie
Currently Being Moderated
Trying to send mail based on the sample code provided in the Note 357385.1
Getting Error when i am trying to execute the code. If i pass null for the P_ATTACHMENT1 then i am getting the mail without any attachment(Which i agree as i am passing null). So i am very much sure that when passing the File name it is getting the error.

I have created an OUT_DIR directory with the path where the file resides(from FND_CONCURRENT_REQUEST.OUTFILE_NAME table)
Then executing the below block:

declare
po_err_msg varchar2(1000);
begin
demo_mail.send_email
(P_DIRECTORY =>'OUT_DIR',
P_SENDER => 'test@test.com',
P_RECIPIENT => 'test@test.com',
P_CC => '',
P_BCC => '',
P_SUBJECT => 'New Invoices ',
P_BODY => 'Please find the following n attachments.',
P_ATTACHMENT1 => 'TEST.6613451',
P_ATTACHMENT2 => NULL,
P_ATTACHMENT3 => NULL,
P_ATTACHMENT4 => NULL,
P_ERROR => po_err_msg);
dbms_output.put_line('THIS IS THE ERROR: '||po_err_msg); -- should be 0.
end;
/

Error at line 1
ORA-22289: cannot perform FILECLOSE operation on an unopened file or LOB
ORA-06512: at "SYS.DBMS_LOB", line 714
ORA-06512: at "APPS.DEMO_MAIL", line 366
ORA-22288: file or LOB operation GETLENGTH failed
No such file or directory
ORA-06512: at line 4.

Can anyone please say me the cause of the problem.

Regards,
RR

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points