• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

open/Read file from oracle bfile

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a project to insert data into Bfile column in oracle DB and read it back in JAVA:

I did as below but getting error @ line where i am trying to open file to read:

*****************************************************************************************

*******************************************************

Error message states:
java.sql.SQLException: ORA-22285: non-existent directory or file for FILEOPEN operation
But file exist in the location mentioned
Please suggest if i have to give some some folder setting at directory level.
Folder is visible to all users to read and write>
 
Marshal
Posts: 8304
592
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi priya kakkar,

Please use code tags when you post actual code. I have added them for you.
See how better your code looks like?

You could find some useful information how to UseCodeTags (<- link).
 
Marshal
Posts: 75874
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens when you execute that query at the command line? I presume that works; it looks simple enough.

Which line does that Exception occur on? Please show us the exact paths to the class you are executing that code in, and the location of the Oracle program, and the instruction you are using to open the connection.
 
priya kakkar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Getting error at :
// now open the bfile to get the data
bfile.openFile(); //GETTING RUNTIME ERROR HERE!!!

running code from eclipse @ C:\Data\Softwares\Code backup\PDAutomation8.2\src\com\ing\qa\dbtools
 
Campbell Ritchie
Marshal
Posts: 75874
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And what is the error? Please post the stack trace and type of Exception. If it is an SQLException please look in your handbook to find what the error code means.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What output do you get from:

?

Also does Oracle have permission to actually access that directory and file?
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic