Can't open file while loading CLOB

Following the examples on this forum, I've written the following:
CREATE DIRECTORY doc_dir AS 'C:\Documents' ;
DECLARE
source_file BFILE := BFILENAME('doc_dir', 'test_document.doc');
dest_lob CLOB;
amount INTEGER := 4000;
BEGIN
DBMS_LOB.FILEOPEN(source_file, DBMS_LOB.FILE_READONLY) ;
DBMS_LOB.LOADFROMFILE(dest_lob, source_file, amount) ;
COMMIT ;
DBMS_LOB.FILECLOSE(source_file) ;
END ;
This fails with the following message in SQLPlus:
DECLARE
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at line 9
Both the directory and file are definitely there, so what gives? Any ideas?

tell you what take this code.
SQL> create table test_data(id number, clob_data clob)
  2  /
Table created.
SQL>
SQL> declare
  2    l_clob      clob ;
  3    file_loc    bfile := bfilename('DIR_SWF', 'test2.glt2fe_expanded_cs');
  4    l_lang_ctx  number := 0;
  5    l_Warning   number :=0;
  6    l_src       number :=1;
  7    l_dest      number :=1;
  8  begin
  9      dbms_lob.createtemporary(l_clob, TRUE);
10      dbms_lob.fileopen(file_loc, dbms_lob.file_readonly);
11      dbms_lob.loadclobfromfile(l_clob, file_loc, dbms_lob.lobmaxsize, l_Src,l_dest, 0,l_lang_ctx, l_Warning);
12      dbms_output.put_line(dbms_lob.getlength(l_clob));
13      insert into test_Data values(1,l_clob);
14      dbms_lob.fileclose(file_loc);
15  end;
16  /
PL/SQL procedure successfully completed.
SQL>
SQL> select dbms_lob.getlength(clob_data) from test_data
  2  /
DBMS_LOB.GETLENGTH(CLOB_DATA)                                                  
                         6727                                                   change the filename if it is not correct in the below code.
create table test_data(id number, clob_data clob)
declare
  l_clob      clob ;
  file_loc    bfile := bfilename('DOC_DIR', 'test_documents.txt');
  l_lang_ctx  number := 0;
  l_Warning   number :=0;
  l_src       number :=1;
  l_dest      number :=1;
begin
    dbms_lob.createtemporary(l_clob, TRUE);
    dbms_lob.fileopen(file_loc, dbms_lob.file_readonly);
    dbms_lob.loadclobfromfile(l_clob, file_loc, dbms_lob.lobmaxsize, l_Src,l_dest, 0,l_lang_ctx, l_Warning);
    dbms_output.put_line(dbms_lob.getlength(l_clob));
    insert into test_Data values(1,l_clob);
    dbms_lob.fileclose(file_loc);
end;
select dbms_lob.getlength(clob_data) from test_data
/

Similar Messages

  • Can you open files while FileVault is encrypting for first time?

    I cannot open any of my documents on my computer since FileVault started encrypting.. what do I do? I need my notes and documents for classes.

    I can open documents in Word or Microsoft programs, but I cannot open my notes with Preview whatsoever.. I will click on a document and it will not pop up.

  • Can't open file syntax.vim

    I have vim installed from extra (x86_64). When I start vim I get the following error:
    $ vim
    Error detected while processing /etc/vimrc:
    line 41:
    E484: Can't open file /usr/share/vim/vimcurrent/syntax/syntax.vim
    Error detected while processing /home/nsmoot/.vimrc:
    line 63:
    E484: Can't open file /usr/share/vim/vimcurrent/syntax/syntax.vim
    Press ENTER or type command to continue
    There is not a "current" directory on my system...
    # find / -name "syntax.vim" -print
    /usr/share/vim/syntax/syntax.vim

    I had this problem, but the culprit was mercurial for me.
    If you're getting the vim72 error check what's in that directory.
    The only file in there for me was..
    # ls /usr/share/vim/vim72/syntax/
    HGAnnotate.vim
    # pacman -Qo /usr/share/vim/vim72/syntax/HGAnnotate.vim
    /usr/share/vim/vim72/syntax/HGAnnotate.vim is owned by mercurial 1.3-1
    I tested it first by moving vim72 to vim72.bak and the problem went away, after that I uninstalled mercurial (I never use it)
    Here's the loading order according to the vim documentation:
    You don't normally set $VIMRUNTIME yourself, but let Vim figure it out. This
    is the order used to find the value of $VIMRUNTIME:
    1. If the environment variable $VIMRUNTIME is set, it is used. You can use
    this when the runtime files are in an unusual location.
    2. If "$VIM/vim{version}" exists, it is used. {version} is the version
    number of Vim, without any '-' or '.'. For example: "$VIM/vim54". This is
    the normal value for $VIMRUNTIME.
    3. If "$VIM/runtime" exists, it is used.
    4. The value of $VIM is used. This is for backwards compatibility with older
    versions.
    5. When the 'helpfile' option is set and doesn't contain a '$', its value is
    used, with "doc/help.txt" removed from the end.
    source: http://www.vim.org/htmldoc/starting.html#$VIMRUNTIME
    It was loading #2 for me, removing vim72 directory means it loads #4. (skips #3 since I don't have a /usr/share/vim/runtime dir)

  • ActiveX Excel Prevent Open File While Writting

    I'm having some of the same problems with Excel and ActiveX found here:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=254019&view=by_date_ascending&page=1
    The last post from the above link gives an acceptable workaround (not ideal, but hey, what can you do?) to preventing the user from closing Excel when files are being written to with ActiveX through LabVIEW (since a user can open an Excel file while LV is writting to Excel files with ActiveX and all the files will share the same Excel application, instead of Excel opening a seperate application like one would hope).
    My question for this post: In the previous post Ben had a problem with the user opening a different Excel file than those being written to. My VI opens an exisiting Excel file (test.xls) and writes to it. If the user opens test.xls while LV is still writting test.xls, it will throw an error. Note that the error is not thrown if test.xls is open before the VI starts writting to it, only if the user opens it while its being written to by LV.
    Any ideas on how to lock the file so the user can't open it while it is being used by LV?
    Michael

    Thanks thols. Thats a great solution, I actually had tried it but gave it up since the user could close out of "their" Excel (closing the reference), then open a new spreadsheet which would open in "my" Excel (if done while my subVI was still writing to Excel). At the time, this was a possible scenario for my program, and since I was writing so slowly had happened. I just sped up the writing of the Excel file (I had all the data to write, but was writing with "Set Cell Value.vi", which wrote one cell at a time; instead I wrote whole ranges of data). If Excel was already open, I would set interactive to false and have my spreadsheet minimized while writing to it. If Excel wasn't open, I would just make it invisible. Since I cut the time down to about a second, this worked for my application.
    Michael

  • Can't open file "~/Library/Application Support/iWeb/Domain.sites"

    I was working on iWeb today, doing the usual adding pictures, and gave a few pages some color, and a few pictures here and there.
    I restart my computer, because as usual, I almost have no memory left. When the computer is running again, I opened iWeb, and I get this odd message:
    Can't open file "~/Library/Application Support/iWeb/Domain.sites"
    Why is this here? I didn't do anything weird to trigger such message. The site was working perfectly fine! I tried taking the domain file to the desktop, then opening it once iWeb launches from there, and same message appears. I put it back to its place, and tried putting the iWeb plist on the desktop, and same deal!
    Everything is back in its place, I haven't changed or triggered anything to deserve this. I ran Onyx, full optimization update. I restarted computer, and conducted a full disk permission repairs. Only 1 error found out of another app.
    My computer is healthy, my programs are running fine. What is going on? Does anyone know how I can fix this?

    Hi
    Whaow 3.1GB. I'm sure iWeb has problems with that. I have the same problem with my iWeb. I have about 100 BLOG pages with a lot of pictures. Although iWeb scales the pictures when publishing (good!) it does not scale them when they are stored in the domains file/dir (bad!) So if you have an 8MP camera, this adds up after a while.
    You can open the comains file and try to figure out what causes the trouble. (Right click/CTRL click, open content) sort on size to see if you have some extremely large stuff in there (Movies???) Take them out and try to make them smaller.
    Good luck!!
    Walter

  • [Solved][VIM] E484: Can't open file syntax.vim

    Hi all,
    I've installed Archlinux few days ago on my netbook and yesterday i decided to configure Vim using plugins.
    During plugins configuration, i messed up and i decided to revome all Vim files in my ~ folder in order to restart configuration.
    However, since I've executed the `rm -R .vim .vimrc .viminfo` command, I can't re-activate Vim's syntax coloration using `syntax on` into my .vimrc file nor into Vim directly.
    Here is the error message when I start Vim :
    Error detected while processing /home/romain/.vimrc:
    line 1:
    E484: Can't open file /home/romain/.vim/syntax/syntax.vim
    Press ENTER or type command to continue
    I've found this topic on BBS which seems to be the same problem as me but reinstalling vim or vi doesn't solve this problem.
    I've tried to copy this syntax.vim file from /usr/share/vim/vim73/syntax/syntax.vim but it doesn't solve the problem and I want a clean solution without hacking my ~ folder ; moreover, this bug also appears being root while I haven't configured vim with the root account so it may be a problem into Vim's installation folders or something.
    Thanks for your help and sorry I my english contains mistakes,
    MicroJoe.
    Last edited by MicroJoe (2012-06-14 16:16:45)

    This is the output :
    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 7 2012 00:41:40)
    Rustines incluses : 1-547
    Compilé par ArchLinux
    Grosse version sans interface graphique.
    Fonctionnalités incluses (+) ou non (-) :
    +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
    -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
    +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
    -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
    +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
    +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
    +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
    +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
    +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme -netbeans_intg
    +path_extra +perl +persistent_undo +postscript +printer -profile -python
    -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
    -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
    +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
    -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
    +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
    -xterm_clipboard -xterm_save
    fichier vimrc système : "/etc/vimrc"
    fichier vimrc utilisateur : "$HOME/.vimrc"
    fichier exrc utilisateur : "$HOME/.exrc"
    $VIM par défaut : "/usr/share/vim"
    Compilation : gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/local/include -march=i686 -mtune=generic -pipe -fstack-protector --param=ssp-buffer-size=4 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Édition de liens : gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -fstack-protector -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    (I've noticed that some part were in French but I hope that it'll not be a problem).

  • Snow Leopard 10.6.2 CS4 InDesign can't open files with a "#" in file path

    Snow Leopard 10.6.2 CS4 InDesign can't open files with a "#" in file path using any of these perfectly normal methods:
    1. double-click file in the Finder (e.g in a Folder on your Mac or on your Mac desktop etc.)
    2. select file and choose "File... Open" command-o in the Finder
    3. drag file to the application icon in the Finder.
    4. Select file in Bridge and double-click, choose File.. Open.. or Drag icon to InDesign icon in dock.
    If you try to open an ID file named with a "#", you will get an error message "Missing required parameter 'from' for event 'open.'"
    This happens to any InDesign file that has a "#" (pound sign, number sign, or hash) in the filename or in the file path (any parent folder).
    To reproduce
    Name an InDesign file Test#.idd Try to open it in the Finder or Bridge (as opposed to the "Open" dilaog of InDeisng itself).
    "Solution"
    The file WILL open using File... Open... command-o while in InDesign application.
    Rename the file or folders that have a "#" (shift-3) in the filename.
    Report to Adobe if it bugs you.
    This does not occur in "plain" Leopard 10.5 nor Tiger 10.4
    Untested in Panther or before and
    Untested with CS3 and earlier in Snow Leaopard.
    Anyone have those and want to try this... ?

    In case this really bothers you: we've added a workaround for this into Soxy. If you enable the option, these documents will open fine on double-click.
    You need Soxy 1.0.7 from:
    http://www.rorohiko.com/soxy
    Go to the 'Soxy' - 'Preferences' - 'Other' dialog window, and enable 'Open InDesign via Script'
    (Irrelevant background info (it's all invisible to the user): the workaround works by special-casing how Soxy opens documents in InDesign: instead of using AppleScript, Soxy will use ExtendScript to instruct InDesign to open the document - which works fine).

  • Java.io.IOException: Too many open files while deploying in soa 11g

    hi all,
    I am getting a strange error while deploying any composite .. it's a hello world kinda composite but while i am trying to deploy it i am getting "java.io.IOException: Too many open files" while deployment.. i have tried to deploy it in 2-3 ways but all of them resulted in the same error..bouncing the soa server might be an option but can someone give an insight as why it is happening and can it be resolved without restarting the server..
    Thanks

    yes..so this problem is with unix only ..coz i previously worked in Windows ..never got this problem..

  • Can't open file 2

    I have a finished project in indesign. It crashed and now it won't open and I'm freaking out. I'm new to Mac, and can't seem to either locate or open the autosave file.  The error message reads "can't open file, may not support format missing plug in, etc. I read the previous post but none of it seems to apply. the program crashed while printing to a .pdf.
    any and all help will be greatly appreciated!

    There is no "autosave" file that you would be able to open independent of the application.
    Generally, when ID crashes it will attempt to recover any file that was open at the time of the crash when you relaunch. If the recovery data is corrupt you might see an error message, but usually the program will crash again, and the next restart will bring up a dialog asking if you want to recover. If you say "no" at that point ID should launch, but your previous file will not be recovered, and the recovery data becomes useless.
    At this point are you able to open InDesign at all? Do you have any copies of the file as backup anywhere?
    Tommy Donovan from Adobe is looking at corrupt files, though he is rarely able to fix them. For more information you can see http://forums.adobe.com/message/1291449#1291449
    Peter

  • Vi error on nfs mount; E212: Can't open file for writing

    Hi all,
    I've setup a umask of 0 for testing on both NFS client (Centos 5.2) and NFS server (OSX 10.5.5 server).
    I can create files as one user and edit/save out as another user w/o issue when directly logged into the server via ARD.
    However, when I attempt the same from an NFS mount on a client machine, even as root I get the following error using vi;
    "file" E212: Can't open file for writing
    Looking at the system.log file on the server, I see;
    kernel[0]: add_fsevent: no name hard-link! dropping the event. (event 2 vp == 0xa5db510 (-UNKNOWN-FILE)).
    This baffles me. My umask is 0 meaning files I create and attempt to edit as other users are 777, but I cannot save out edits unless I do a wq! in vi. At that point, the owner of the file changes to whomever did the vi.
    This isn't just a vi issue as it happens using any editor, but I like to use vi.
    Any help is greatly appreciated. Hey, beer is on me!

    Hi all,
    Thanks for the replies
    I've narrowed it down to a Centos client issue.
    Everything works fine using other Linux based OS's as clients.
    Since we have such a huge investment in Centos, I must figure out a workaround. Apple support wasn't much help as usual however they were very nice.
    There usual response is "its unsupported".
    If Apple really wants to play in the enterprise of business space, they really need to change there philosophy. I mean telling me that I shouldn't mount home directories via NFS is completely rediculus.
    What am I supposed to use then, Samba of AFP? No, I don't think so. No offense to Microsoft but why would I use a Windows based file sharing protocol to mount network shares in a Nix env???

  • How can i open file from adobe reader..i already have adobe read

    how can i open file from adobe reader..i already have adobe reader installed and cannot open a
    file and i cannot convert my file into pdf..

    Is the file really a PDF? Where is it? Have you tried opening it from within Reader?

  • Iweb installed on a new computer but i have this error message: Can't open file "~/Library/Application Support/iWeb/Domain.sites2."

    I have just installed ilife on my  new computer from my disk. I have several backups of my webpage from my  old computer. Everything would be great if I could just run the program. When I click the icon for iWeb I get the following message:  Can’t open file “~/Library/Application Support/iWeb/Domain.sites2.”
    Somebody please help! I desperately need to update my website.

    In Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    Just launch the application, find and select the domain file you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    You can download an already compiled version with this link: iWeb Switch Domain.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    OT

  • Error message: "Can't open file"

    Using Keynote 3.0.x I try to open a keynote file created a year ago and when I try to open the "Opening" dialog comes up, you see the progress bar, and then, I get the error message, "Can’t open file" followed by the file name. Any recourse?
    PowerMac G5   Mac OS X (10.4.7)   FInal Cut Pro 5.1

    I later discovered the file was damaged. Went back to a backup copy and things were fine. Good think we have backups.

  • Error message: "Can't open file "[File path, file name].key"

    If I attempt to open any Keynote files, I now get this error message.
    "Can't open file "[File path: file name].key"
    To clarify, the text in the square brackets above would be the file path and then the file name.
    The file then will appear on the screen, but is unresponsive to any clicks or menu commands.
    The files will open successfully on other Macs, so they aren't corrupt.
    Also - I've just checked, and opening Keynote and trying to create a new presentation leads to the same problem: All screen menus / buttons are dead - all I can do is drag the window around the screen.
    I've tried to reinstall Keynote, but this hasn't resolved the problem.
    Is there some corrupt preference file (or similar) that I need to get rid of? Is there an easy way to do a complete uninstall of Keynote so I can try another install? Or is this a symptom of something else?
    All ideas gratefully appreciated!
    Message was edited by: Brendan Donlon

    All the issues I describe in my questions around this time re: Keynote were actually symptoms of a soon-to-die laptop. The Hard Disc was corrupting, and Keynote was the first application to be affected.

  • Can't open files in iCloud

    Just recently, I haven't been able to open files stored in iCloud using either Pages or Numbers. When I try with either application, I get an error message saying, e.g.,  "The file “Wines.pages” couldn’t be opened." What can I do to fix that?

    Possibly you have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 110 features from Pages 5 and added many bugs.
    Peter

Maybe you are looking for

  • SharePoint 2013 and SQL Server 2014

    Does SharePoint 2013 supports SQL Server 2014 for Reporting Services, PowerPivot

  • Netting two contract accounts

    Hi, I have two installations that are some distance apart.  Installation A has a consumption meter (one register).  Installation B has a net meter (two registers) as it has a solar panel.   Both installations have meters read hourly.  The business pa

  • Can an individual webpage on iWeb be password protected?

    I want to be able to password protect certain pages, not all of my iMac iWeb pages. Is this possible?

  • How could i put the text background of each node transparent?

    I am working on JTree. I Assign distinct icons to each node and a background image to the Jtree. I use transparent images to each node but the background text of each node have color. How could i do to put the text background of each node transparent

  • IPhoto doesn't import

    Hi everyone, I could really use some help. I recently acquired a new MacBook Pro (i7, Snow Leo 10.6.3) to replace my old one (MacBook Pro Core 2 Duo, SnowLeo 10.6.3). So I wanted to take my photos from my iPhoto 08 to the new iPhoto 09. So I copied m