Cause: There are several causes:
1. The LOB locator was never initialized
2. The locator is for a BFILE and the routine expects a BLOB/CLOB/NCLOB locator
3. The locator is for a BLOB/CLOB/NCLOB and the routine expects a BFILE locator
4. Trying to update the LOB in a trigger body -- LOBs in trigger bodies are read-only
5. The locator is for a BFILE/BLOB and the routine expects a CLOB/NCLOB locator
6. The locator is for a CLOB/NCLOB and the routine expects a BFILE/BLOB locator
Action: For (1), initialize the LOB locator by selecting into the locator variable or by setting the LOB locator to empty. For (2),(3), (5), and (6),pass the correct type of locator into the routine. For (4), remove the trigger body code that updates the LOB value.
this is the method i called.
PROCEDURE sp_photo_insert(photoname IN varchar2, result OUT varchar2)
src_lob bfile:= bfilename('PIC_DIR',photoname);
amt integer := dbms_lob.getlength(src_lob);
SELECT scan_pic INTO dest_lob FROM tb_person FOR UPDATE;