5 Replies Latest reply: Nov 16, 2012 6:37 AM by Keith Jamieson RSS

    dbms_xmlparsare error

    Kishore 7284612
      Hi Friends,

      I got the following while working with dbms_xmlparsare.

      My code :--
      p := dbms_xmlparser.newparser;
      dbms_xmlparser.setbasedir(p, p_comms_dir_path);
      --xmlparser.setValidationMode(p,TRUE);
      dbms_xmlparser.parse(p, p_comms_dir_path || '/' || p_xmlfile);
      doc := dbms_xmlparser.getdocument(p);

      Error:-

      ORA-29283: invalid file operation
      ORA-06512: at "SYS.UTL_FILE", line 475
      ORA-29283: invalid file operation

      Regards,
      Kishore
        • 1. Re: dbms_xmlparsare error
          Keith Jamieson
          Your error is related to how youd efine your oracle directory.

          This is a name you create which you must point to an exsiting directory on the database server and oracle must have privileges to read and write to this directory.

          eg for unix
          create or replace directory my_dir as '/tmp';
          or for windows:
          create or replace directory my_dir as 'c:/temp';
          So here you specify my_dir as the directory name.

          Can you log in as the oracle user and write to that directory.
          Does the filesystem directory exist?
          Is it on the database server?
          • 2. Re: dbms_xmlparsare error
            Solomon Yakobson
            Post values od p_comms_dir_path and p_xmlfile
            Assuming p_xmlfile is file name in base directory p_comms_dir_path and both are valid, use:
            dbms_xmlparser.parse(p,p_xmlfile);
            Keep in mind, p_comms_dir_path is oracle directory object name that points to directory on datbase server, not on client box. Also, user oracle must have read permission on file p_xmlfile.

            SY.
            • 3. Re: dbms_xmlparsare error
              Kishore 7284612
              Hi Keith Jamieson ,

              I have created directory with grant permission. still have same error.


              --kishore                                                                                                                                                                                                                                                   
              • 4. Re: dbms_xmlparsare error
                Solomon Yakobson
                user7284612 wrote:
                I have created directory with grant permission. still have same error.
                Again, post values for p_comms_dir_path and p_xmlfile.

                SY.
                • 5. Re: dbms_xmlparsare error
                  Keith Jamieson
                  What about operating system permissions?

                  You have a basic UTL_FILE problem.


                  And do as Solomon Suggests.