Show us the ACTUAL error in process. Show us the call to the procedure with the actual parameter being passed, then run it in SQL* Plus and show the error output on screen.
Also what is your full Oracle database version? Don't just say Oracle 11g or 12c. Say 22.214.171.124.2 or 126.96.36.199
And do NOT post DUPLICATE threads (there's another thread you posted with same subject).
- A blob might not be representable as a clob. Blob data can have binary data combinations that aren't valid code-points in character sets. So you should only do this if you know this isn't the case.
- We cannot guess what the problem is with just an error message, we need the exception stack information - the full error returned. Line information etc. Also, try commenting out the debug_autonomous.record_details, tring again, in case it's that.
- You cannot append an empty string in dbms_lob.writeAppend, so if lc_text_buffer is empty you'll get ORA-06502 - although I'm not sure if that would be possible with your code.
- Don't duplicate post, it's against the community rules - so delete your other copy.
Sorry for the duplicate post. I asked moderator to remove the duplicate.
I will update with my findings.
A PDF is not necesarily all plain text, there can be binary info (fonts, images, geoinformation, etc) in there as well. Storing a pdf in Oracle would be best done using Blob, not Clob if you want to preserve everything inside the pdf. Unless you parse it first, which I don't see happening in the code you posted.