This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes SQLException: non-existent directory or file for FILEEXISTS operation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQLException: non-existent directory or file for FILEEXISTS operation" Watch "SQLException: non-existent directory or file for FILEEXISTS operation" New topic
Author

SQLException: non-existent directory or file for FILEEXISTS operation

Dan Lynch
Ranch Hand

Joined: May 16, 2003
Posts: 47
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQLException: non-existent directory or file for FILEEXISTS operation
 
Similar Threads
java.sql.SQLException: Exhausted Resultset
Extracting BFILE from database
ClassCastException when casting my resultset to OracleResultSet
Connection pooling issue in Apache 6.0
Usage of list() with File to search files and directories