Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLException: non-existent directory or file for FILEEXISTS operation

Dan Lynch
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im getting this error when I try and run certain methods on a BFile. I think its to do with my directory alias. Could anyone there please tell me how to set this up properly. Does it have to do with insert and update commands in SQL?
Here is the code its running on:
rset = stmt.executeQuery(
"SELECT annotate FROM dan.annotation WHERE anno_id = 3");

src_lob = ((OracleResultSet)rset).getBFILE(1);
System.out.println("Length of BFILE: " + src_lob.getLength());
Funny thing is it prints the .getName() fn and the getLenght() fn. But it crashes out on the .fileExists() method giving the following error:
java.sql.SQLException: ORA-22285: non-existent directory or file for FILEEXISTS operation

at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.ttc7.TTIoer.processError(
at oracle.jdbc.ttc7.v8TTILob.receiveReply(
at oracle.jdbc.ttc7.v8TTIBfile.doesExist(
at oracle.jdbc.ttc7.TTC7Protocol.fileExists(
at oracle.sql.LobDBAccessImpl.fileExists(
at oracle.sql.BFILE.fileExists(
at openBfile.main(

Please help!!!
Cheers in advance
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic