Win a copy of Functional Reactive Programming this week in the Other Languages 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
Hey,
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");

while(rset.next())
{
System.out.println(((OracleResultSet)rset).getBFILE(1).getName());
src_lob = ((OracleResultSet)rset).getBFILE(1);
System.out.println("Length of BFILE: " + src_lob.getLength());
System.out.println(src_lob.fileExists());
}
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(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.v8TTILob.receiveReply(v8TTILob.java:989)
at oracle.jdbc.ttc7.v8TTIBfile.doesExist(v8TTIBfile.java:262)
at oracle.jdbc.ttc7.TTC7Protocol.fileExists(TTC7Protocol.java:2869)
at oracle.sql.LobDBAccessImpl.fileExists(LobDBAccessImpl.java:1060)
at oracle.sql.BFILE.fileExists(BFILE.java:502)
at openBfile.main(openBfile.java:66)

Please help!!!
Cheers in advance
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic