ORA-22285 - non-existent directory or file for FILEOPEN operation

Hello
I want to insert the xmldata from a xmlfile to the a table, with this scirpt:
#!/bin/sh
set -x
for i in `find . -name "dspevent*.xml"| awk -F"/" '{print $NF}'`
do
echo $i
fname_old=$i
fname_neu=`ls $i | awk '{print "OK_"$0}'`
cat $i | sed 's/aps://g' >$fname_neu
echo $fname_neu
rm $i
#insert_xml $fname_neu
INSERT_XML=`sqlplus -s username/passwort@database <<EOF
INSERT INTO event_xml (name,
dtsysl,
hrsysl,
dtcptl,
nusesi,
dsp_step,
dsp_state,
bat_class,
bat_program,
bat_seqi,
bat_state)
SELECT *
FROM XMLTABLE (
'Operations/Event'
PASSING xmltype (BFILENAME ('EVENT_DIR', '$fname_neu'),
NLS_CHARSET_ID ('CHAR_CS'))
COLUMNS name VARCHAR (40) PATH 'name',
dtsysl DATE PATH 'dtsysl',
hrsysl NUMBER PATH 'hrsysl',
dtcptl DATE PATH 'dtcptl',
nusesi NUMBER PATH 'nusesi',
dsp_step VARCHAR (40) PATH 'DSP/step',
dsp_state VARCHAR (40) PATH 'DSP/state',
bat_class VARCHAR (40) PATH 'BAT/class',
bat_program VARCHAR (40) PATH 'BAT/program',
bat_seqi NUMBER PATH 'BAT/seqi',
bat_state VARCHAR (40) PATH 'BAT/state');
EOF
`
done
But the problem is, that I have always this error message:
ORA-22285 -> non-existent directory or file for FILEOPEN operation
I'd create a direcotrie and over utl_file.fopen I can write a file to this directorie, but this works over the path, not over the directory name. the utl_file_dir parameter was also set to the correct path. Whats wrong or how can I debug this problem?
thanks.
roger

- the name of the directory is correct.
- how can I check, that the user can use the directory?
- in this logfile you can see that, the file name will replace correctly:
./dspevent.sh
+ awk -F/ {print $NF}
+ find . -name dspevent*.xml
+ echo dspevent_db_20110503030448_10641.xml
dspevent_db_20110503030448_10641.xml
fname_old=dspevent_db_20110503030448_10641.xml
+ awk {print "OK_"$0}
+ ls dspevent_db_20110503030448_10641.xml
fname_neu=OK_dspevent_db_20110503030448_10641.xml
+ sed s/aps://g
+ cat dspevent_db_20110503030448_10641.xml
+ echo OK_dspevent_db_20110503030448_10641.xml
OK_dspevent_db_20110503030448_10641.xml
+ rm dspevent_db_20110503030448_10641.xml
+ sqlplus -s username/passwort@db
INSERT INTO event_xml (name,
dtsysl,
hrsysl,
dtcptl,
nusesi,
dsp_step,
dsp_state,
bat_class,
bat_program,
bat_seqi,
bat_state)
SELECT *
FROM XMLTABLE (
'Operations/Event'
PASSING xmltype (BFILENAME ('EVENT_DIR', 'OK_dspevent_db_20110503030448_10641.xml'),
NLS_CHARSET_ID ('CHAR_CS'))
COLUMNS name VARCHAR (40) PATH 'name',
dtsysl DATE PATH 'dtsysl',
hrsysl NUMBER PATH 'hrsysl',
dtcptl DATE PATH 'dtcptl',
nusesi NUMBER PATH 'nusesi',
dsp_step VARCHAR (40) PATH 'DSP/step',
dsp_state VARCHAR (40) PATH 'DSP/state',
bat_class VARCHAR (40) PATH 'BAT/class',
bat_program VARCHAR (40) PATH 'BAT/program',
bat_seqi NUMBER PATH 'BAT/seqi',
bat_state VARCHAR (40) PATH 'BAT/state');
INSERT_XML= PASSING xmltype (BFILENAME ('EVENT_DIR', 'OK_dspevent_db_20110503030448_10641.xml'),
ERROR at line 15:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.XMLTYPE", line 296
ORA-06512: at line 1
+ echo dspevent_db_20110502190712_10641.xml
dspevent_db_20110502190712_10641.xml

Similar Messages

  • DBMS_LOB.FILEOPEN(dir, fname) gives non-existent dir or file error

    Hello!
    I've been trying to load an image file into the oracle database using the DBMS_LOB loadfromfile procedure. In order to do this, I first have to open the appropriate file which I do using
    temp_bfile := bfilename('temp_dir', in_filename);
    where in_filename is a string having the appropriate filename. and 'temp_dir' is a directory object created as follows:
    CREATE DIRECTORY temp_dir AS 'F:\';
    Next when I do a
    DBMS_LOB.FILEOPEN(temp_bfile, LOB_READONLY);
    I get an exception ORA-22285:non-existent directory or file.
    What am I doing wrong? Is the way I've created the directory object correct. I work on an NT machine.
    Mona

    Not sure if the UTL_FILE package is the same but if you don't set the "utl_file_dir" variable in the INIT.ORA file prior to calling the FOPEN procedure you will get a similiar error. There may be an equivalent parameter for the DBMS_LOB package.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Mona Marathe ([email protected]):
    Hello!
    I've been trying to load an image file into the oracle database using the DBMS_LOB loadfromfile procedure. In order to do this, I first have to open the appropriate file which I do using
    temp_bfile := bfilename('temp_dir', in_filename);
    where in_filename is a string having the appropriate filename. and 'temp_dir' is a directory object created as follows:
    CREATE DIRECTORY temp_dir AS 'F:\';
    Next when I do a
    DBMS_LOB.FILEOPEN(temp_bfile, LOB_READONLY);
    I get an exception ORA-22285:non-existent directory or file.
    What am I doing wrong? Is the way I've created the directory object correct. I work on an NT machine.
    Mona<HR></BLOCKQUOTE>
    null

  • Saving a file to a non-existing directory

    Hello all,
    I would like to know if it is possible to save a file to a non-existing directory using Java. I have a bad feeling that it's not possible, but if there is anyone out there who thinks otherwise, please tell me how it can be done.
    Thanks very much!
    Greetz Hans

    Hi,
    Of course you can create all you want.
    Try
              File fichier = new File(chemin);
              if ( ! fichier.exists()) {
                   // the path doesn't exist
                   ok = fichier.mkdirs();
    The mkdirs (with the s) can create the path in a recursive mode. See the File object's help
    Regards, JFB

  • What's with the non-existant free trial download for Photoshop?

    What's with the non-existant free trial download for Photoshop?  You click on "Download free trial" and it takes you to a page that takes you to a forum… nothing happens.  I've done this about 6 times on two browsers.  Of course, there's no help from Adobe, so I'm trying this forum.  Thanks!

    Thanks very much for a prompt reply!  Much appreciated. Unfortunately, that's exactly the page I was on. And I used both Firefox and Safari and got the same page, with the same nothing...
    As this forum doesn't allow attachments, I'll cut and paste the page here (there's not much):
    Keep learning
    Whether you're new or a pro, we're always making Photoshop better.
    Learn more with these tutorials.
    Get support
    Have any questions? Visit the Learn & Support area for help.
    That's all that's on the page.  No buttons, URLs, menus… nothing.  And just to confirm, the URL  is as you gave: https://creative.adobe.com/products/download/photoshop
    Something's fishy...

  • Anyone know why I got this Terminal Error? [ERROR]      CPPathUtils.c:526      The device-file for this operating system, 'osx-12.1.0.xml', was not found.

    Here is the full text:
    [ERROR]          <CPPathUtils.c:526>          The device-file for this operating system, 'osx-12.1.0.xml', was not found. An attempt to revert to a previous revision of the OS device-file: 'osx-12.0.0.xml' has been made. Please file a Radar report with Apple, on the 'CoreProfile' component, version 'X'.
    Appeared after 10.8.1 Friday update while troubleshooting USB/FW issues w/ Mountain Lion.

    OK. To recap:
    1. Open Terminal.app
    2. Type at cursor:
    cd /System/Library/PrivateFrameworks/CoreProfile.framework/Versions/A/Resources/De vices/
    3.  Press Return
    4.  Type at cursor:
    ls
    5.  Press Return
    6.  Type at cursor:
    sudo ln -s osx-12.0.0.xml osx-12.1.0.xml
    7.  Press Return
    8. Enter password if asked
    9. Done.
    Can I then type ls again to verify the change?

  • Writing a new file in non-existent directory

    I've written a program that will read files from one area and write them to another. It works great when the directory structure is already in place, but when I try to write the file in a directory that doesn't exist then problems occur. I was just wondering if there was some way of making it create the directory for me or do I have to parse the string and create the directories by hand? Thanks,
    Dave Johansen

    There's also a File.mkdirs() that will create any non-existent parent directories.

  • ASM ORA-27041 'Global Resource Directory partially frozen for dirty detach'

    Hi there,
    I am running a 10gR2 RAC on two nodes with ASM. Once in three days, the following happens to the ASM instance of one of the nodes. But it's not predictable which node will be next. In other words: Both ASM instances failed so far, but never both at the same time. Least I can say, the cluster always worked. But what the f... happens here? Please have a look at the following alert log extract of the ASM system.
    ---------------------------------------snip---------------------------------------------
    <notmal operational output until here>
    Tue Jan 17 05:33:28 2006
    WARNING: cache failed to read fn=2 blk=0 from disk(s): 1 0
    ORA-27041: Datei kann nicht geoffnet werden
    NOTE: cache initiating offline of disk 1 group 2
    NOTE: cache initiating offline of disk 0 group 2
    WARNING: offlining disk 1.4051955519 (AWISRACVOL_0001) with mask 0x3
    WARNING: offlining disk 0.4051955520 (AWISRACVOL_0000) with mask 0x3
    NOTE: PST update: grp = 2, dsk = 1, mode = 0x6
    NOTE: PST update: grp = 2, dsk = 0, mode = 0x6
    Tue Jan 17 05:33:28 2006
    ERROR: too many offline disks in PST (grp 2)
    Tue Jan 17 05:33:28 2006
    NOTE: PST not enabling heartbeating (grp 2): group dismounted
    Tue Jan 17 05:33:28 2006
    NOTE: halting all I/Os to diskgroup AWISRACVOL
    NOTE: active pin found: 0x0x1019bcc38
    NOTE: active pin found: 0x0x1019bcce8
    Tue Jan 17 05:33:33 2006
    ERROR: PST-initiated MANDATORY DISMOUNT of group AWISRACVOL
    NOTE: cache dismounting group 2/0x9D831FCE (AWISRACVOL)
    NOTE: dbwr not being msg'd to dismount
    Tue Jan 17 05:33:33 2006
    kjbdomdet send to node 0
    detach from dom 2, sending detach message to node 0
    Tue Jan 17 05:33:33 2006
    Dirty detach reconfiguration started (old inc 2, new inc 2)
    List of nodes:
    0 1
    Global Resource Directory partially frozen for dirty detach
    * dirty detach - domain 2 invalid = TRUE
    553 GCS resources traversed, 0 cancelled
    1067 GCS resources on freelist, 6165 on array, 6165 allocated
    Dirty Detach Reconfiguration complete
    Tue Jan 17 05:33:34 2006
    WARNING: dirty detached from domain 2
    Tue Jan 17 05:33:34 2006
    SUCCESS: diskgroup AWISRACVOL was dismounted
    Tue Jan 17 05:35:25 2006
    WARNING: cache failed to read fn=1 blk=2 from disk(s): 0 1
    ORA-27041: Datei kann nicht geoffnet werden
    NOTE: cache initiating offline of disk 0 group 1
    NOTE: cache initiating offline of disk 1 group 1
    WARNING: offlining disk 0.4051955518 (AWISAUXVOL_0000) with mask 0x3
    WARNING: offlining disk 1.4051955517 (AWISAUXVOL_0001) with mask 0x3
    NOTE: PST update: grp = 1, dsk = 0, mode = 0x6
    NOTE: PST update: grp = 1, dsk = 1, mode = 0x6
    Tue Jan 17 05:35:25 2006
    ERROR: too many offline disks in PST (grp 1)
    Tue Jan 17 05:35:25 2006
    NOTE: PST not enabling heartbeating (grp 1): group dismounted
    Tue Jan 17 05:35:25 2006
    NOTE: halting all I/Os to diskgroup AWISAUXVOL
    NOTE: active pin found: 0x0x1019bcc38
    NOTE: active pin found: 0x0x1019bcce8
    NOTE: active pin found: 0x0x1019bcd98
    Tue Jan 17 05:35:25 2006
    ERROR: PST-initiated MANDATORY DISMOUNT of group AWISAUXVOL
    NOTE: cache dismounting group 1/0x9D731FCD (AWISAUXVOL)
    Tue Jan 17 05:35:26 2006
    kjbdomdet send to node 0
    detach from dom 1, sending detach message to node 0
    Tue Jan 17 05:35:26 2006
    Dirty detach reconfiguration started (old inc 2, new inc 2)
    List of nodes:
    0 1
    Global Resource Directory partially frozen for dirty detach
    * dirty detach - domain 1 invalid = TRUE
    5052 GCS resources traversed, 0 cancelled
    Dirty Detach Reconfiguration complete
    Tue Jan 17 05:35:27 2006
    WARNING: dirty detached from domain 1
    Tue Jan 17 05:35:27 2006
    SUCCESS: diskgroup AWISAUXVOL was dismounted
    <log ends here>
    ---------------------------------------snap--------------------------------------------
    Useless to say that the database based on this ASM instance terminates with complaints about non-readable controlfiles and so on.
    It has been no problem to re-start the ASM- and DB-Instance after this happened. So no persistent damage was done, but I find it widely alarming. Has anybody an idea, or can explain, what Oracle does here?
    Thanks in advance,
    Martin Klier

    Hi,
    it seem we have found the solution of this problem, it has been a whole bunch of trouble:
    - First of all, the interconnect should never be a crossover cable. Oracle said so in the official RAC FAQ, and they describe as reason why not: "b) Instability. We have seen different problems e.g.. ORA-29740 at configurations using crossover cable, and other errors." I had known, but the errors just appeared weeks after the switchover to crossover cabling.
    - The ASM-used devices / raw devices MUST be owned by oracle:oinstall (or :dba depending on the setup), if they are owned by root:disk (with oracle as a memeber of disk) it complains - the ASM instance does exactly the error above.
    - Having this fixed, I always got an error ORA-27041 but without "Global Resource Directory partially frozen". The system worked fine, but on every start of ASM the error was logged. Solution: provide an ASM_DISKSTRING parameter, in order to prevent ASM trying to use other (maybe CRS-used) raw devices than its own.
    The stuff took away three weeks of my life and a bunch of hair :)
    Martin

  • How can I get the directory.xml file for WL6.0?

    I have installed the ALBPM Enterprise WL6.01 and started it in my server.But I get the error message when I login.
    directory configuration runtime fails to initilize with
    resource:/Aqualogic/j2eewl/tomcate/webapps/../../webapps/webconsole/WEB-INF/directory.xml
    How can I get the XML file?

    aaa, ok i misunderstood your first post, i thought you are talking about unable to use the directory.xml from your application.
    Ok, well the directory.xml file that ALBPM uses is allways in /albpm6.0/j2eewl/conf/directory.xml if we are not talking about Standalone. And when you start your albpm server it picks up the directory.xml file from there. But it picks him up only when you start it...so if you made any changes to it, you have to restart the server.
    You should check the instalation folder of your ALBPM.
    If you want to change the user/pass in the directory.xml change it in that folder and restart ALBPM.
    If you don't know how to enter new password you have to use this sintax:
    <encrypt>newPassword</encrypt>
    Because if you open the xml file you have only <encrypted> tags, and you can't change those.
    I don't know what the xml file is doing in that tomcat folder though...maybe it get's copied to that location when you start the albpm WL
    Hope this helps
    Edited by Lex_ at 12/13/2007 10:27 PM

  • LR3 imports into non-existent directory

    I try to import into a certain directory, ...2010/March/Spain. Starting a week after installing the product LR would create a directory ...2010/March/Spain/Justin and place the photos there. I would remove the photos from LR and delete the Justin subdirectory. Try the import again; LR creates ..2010/March/Spain/Justin and places the photos there. Even after the directory is deleted and the PC rebooted, LR continues to show the subdirectory LR as present although the directory has been deleted.
    There are directories named Justin, such as .../2010/April/Justin and .../2010/May/Justin. But LR creates one on its own.
    The image below shows the problem. In the image of the folder next to Justin (on the To side of the import dialog) there is a plus sign on the folder.
    Anyone have any idea why LR3 continues to create and show ../2010/March/Spain/Justin, even when it doesn't exist, on the To side of the import dialog?
    Thanks.

    That's because you have "Into sub folder" and a subfolder name of Justin.
    Uncheck the box and it will not create a sub-folder named Justin.

  • Reason: 5.3.0 - Other mail system problem ('550', ['non-existent reverse DNS entry for X.X.X.X

    We have configured a ESA for a customer whose appliance was broken down because of a software problem and being replaced with a new one by cisco.
    Today we have a big problem about Reverse DNS. When they send email to their customers, the remote mail servers reject their messages. I double check the configuration and haven’t found anything. If we route mail traffic over exchange instead of ironport, there aren’t any problem. The broken device worked about 6 months without being connected. Also, the remote server sends a message like:
    Diagnostic information for administrators:
    Generating server: mail.xyz.com.tr
    [email protected]
    [89.19.0.217] #<[89.19.0.217] #5.0.0 smtp; 5.1.0 - Unknown address error 554-'This server requires PTR for unauthenticated connections.' (delivery attempts: 0)> #SMTP#
    Has anyone come across this type of problem or error code?

    Please check the IP address from which the mail is being delivered to the remote server. This address might differ when the mail is routed through the exchange and through IronPort.
    Most probably, the issue could be because of PTR record of the IP address( that IronPort is using to send the mail) is not registered in the DNS or it is not matching with the domain name. Was there any change in the Network configuration on the new ESA compared to the broken down ESA?

  • Firewire 800 Readers non-existent except on ebay for $169?

    Did someone stockpile them to sell them to mac users who don't have an express card slot in there mac seems crazy. Any comparisons on speed difference when reading from firewire 400/800 on high speed cards

    Probably better to just get a USB2 or USB3 card reader.

  • Non existent hard drive files?

    This may sound stupid but ever since i updated with 1.1.1 it says i have 4gb of 'other' on my iphone.
    It also erased my itunes. I have 238mb of photos.
    What does 'other' represent? Im referring to the little itunes bar at the bottom of the screen when syncing your iphone?
    Please help.

    I had this happen once with the 1.01 software. A Restore fixed it.

  • Changing oaj2se.exe binary file for form operations

    Hi,
    When you open the form service in R12.1.3, you encounter a page with the following message.
    In order to access this application, you must install the J2SE Plugin version 1.6.0_07. To install this plugin, click here to download the oaj2se.exe executable. Once the download is complete, double-click the oaj2se.exe file to install the plugin. You will be prompted to restart your browser when the installation is complete.
    If you need the newer version - let's say 1.6.0.10 - than 1.6.0.07. Then, going through click here will give still the old binary file.
    For this kind of cases, it would be good if the binary file just gives the latest one when clicked to download j2se plugin.
    So, here the questions come.
    Q1.
    Is it safe to replace the old binary file with the latest jre file from Oracle site?
    Q2.
    How can this be done? I mean, where is the location and is it ok just to replace the binary file?
    Does anyone have any idea on this?
    Thanks,

    Hi,
    Please see
    Deploying Sun JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite Release 12 [ID 393931.1]
    This doc looks big, But it is straight forward and very easy to do
    Thanks

  • ORA-22285 Loadclobfromfile and definer rights

    I've create a directory D in schema A.
    Schema A has read permissions on the directory.
    Created a stored procedure X that reads a clob from a file in this directory.
    Running the procedure as user A works ok.
    Granted execute rights on procedure X to user B
    When user B tries to run procedure X I get error: ORA-22285: non-existent directory or file for FILEOPEN operation.
    It turns out I have to grant B read permission on the directory D.
    I don't understand why this is necessary. Procedure X runs with definer rights by default.
    Maybe someone can shed a bit of light on this ?

    // ACEs where r u ?!Oh don't Re: Needs another simple fix ! (Its been over 24hrs, nobody tried! Strange) Alex, I thought you were one of the good guys.
    Anyway, I expect a lot of the Aces are in the air right now, heading for 'Frisco.
    To your question:
    which one of the two above is the best one?It depends. Is John a developer or a user? If John is a developer then the DBA should grant him privileges explicitly. If John is a user then it is appropriate to use a role for his privileges and thus use the AUTHID CURRENT_USER approach.
    Note, I think this example is flawed because I would not expect a user to have a procedure which dynamically creates a table. Certainly I wouldn't expect John as a user to be creating procedures or to know about invoker rights. But the same model applies if the privilege is say SELECT access on another user's tables.
    the question that emerges is why do we have roles anyway if we can't truly rely on them (?)In my view ROLES are intended for managing users rather than developers. Generally I think this means granting table privileges to roles but not system privileges (although CREATE SESSION is an obvious exception). We should not use Roles for managing the privileges of developers, or for application owner accounts come to that. If the account has a schema it probably should have individually granted system privileges; as with most generalisations there is a grey area.
    Cheers, APC
    Message was edited by: inserting the crucial NOT that makes the sentence make sense
    APC

  • ORA-22285

    HI,
    I am having a problem in pl/sql. I am creating a directory object as----"create or replace directory photo_folder as 'D:\IMAGE';
    Then i have made a table like this----create table test(id varchar2(10),image bfile);
    After that when i am trying to insert an image into the table like this---insert into test values('1',bfilename('photo_folder','1.jpg')); it says....1 row created.
    but when i am trying to query the table--select id,dbms_lob.getlength(image)"image size" from test;
    it gives error-----ORA-22285: non-existent directory or file for GETLENGTH operation
    ORA-06512: at "SYS.DBMS_LOB",line 566.
    What am i doing wrong. Plz help me to resolve this.
    regards,
    Argha

    Yes exactly that's the reason!!!
    SQL> create table t(no number, data bfile)
      2  /
    Table created.
    SQL> create directory my_data_dir as 'e:\oracle\log_files\utl_akivanew'
      2  /
    Directory created.
    SQL> insert into t values(1,bfilename('my_data_dir','oracle.gif'))
      2  /
    1 row created.
    SQL> select no, dbms_lob.getlength(data) from t
      2  /
    select no, dbms_lob.getlength(data) from t
    ERROR at line 1:
    ORA-22285: non-existent directory or file for GETLENGTH operation
    ORA-06512: at "SYS.DBMS_LOB", line 566Now see
    SQL> insert into t values(1,bfilename('MY_DATA_DIR','oracle.gif'))
      2  /
    1 row created.
    SQL> select no, dbms_lob.getlength(data) from t
      2  /
            NO DBMS_LOB.GETLENGTH(DATA)
             1                     2059Thanks,
    Karthick.

Maybe you are looking for

  • Standard Costing : CK11N (Inconsistent Cost Component Views)

    Hi, I have created the cost sheet with below information: A) Material B) + Labour C) +Indirect Labour (% of Labour) D) + Utilities E) + Production overhead (% of Material) F) Cost of Goods Manufactured (Total of A to E) G) Admin overhead (% of COGM)

  • Inspection lot not appearing in QA32

    Dear Experts, We have transfered a batch  from a storage location of one plant to the storage location of another plant through movement type 909 with all require datas entered and saved the transaction . But while we checked in MB51 and QA32 , no ma

  • Broken Wire? (SBS 5.1 560)

    First off, I've had this SBS 5.1 560 sound system for about a year and a couple months. As time went on, it got to the point with my SBS 5.1 560 speaker setup that the sound from my left speaker would "crack in and out" occasionally. By messing with

  • How To Set Justification Settings

    Hi, I'm trying to set the justification settings of a paragraph using IJustificationStyle's different setter mehods but the paragraph does not reflect the change that I set into the setter methods. I can see using the IJusificationStyle->GetWordspace

  • Best way to connect a TC with an existing network?

    I currently have a wireless network that is connected in the lower level of my home, but I would like to install the TC in my office on the 2nd floor which does not have any wired ethernet cable installed to it. I am considering using a powerline eth