The problem is with the insert statement. The directory name is stored in UPPER case in the database.
CREATE OR REPLACE DIRECTORY my_dir AS ‘d:my_pictures';
— my_dir is stored as MY_DIR, therefore the insert becomes
INSERT INTO LOB_PICTURES_TABLE VALUES (1,BFILENAME(‘MY_DIR’,’oracle.jpg’));
If you then get the error:
ORA-21560: argument 2 is null, invalid, or out of range
reduce the value of Amount to 1000.
Tested on OracleXE for windows. See Oracle Note:1080814.6