1 Reply Latest reply: Oct 3, 2013 7:04 AM by odie_63 RSS

    getting data via XMLTYPE without the second argument causes SIGSEGV

    user10214810

      Hi,

       

      when I try get data via

      SQL> select XMLTYPE(bfilename('IMPORTDATA','xxxxxxx.xml'))) from dual;

       

      (the second argument is missing), it causes SIGSEGV.

       

      Here is snippet from alert.log:

      Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x1] [PC:0x93A49B1, qctdatetimeconv()+47] [flags: 0x0, count: 1]

      Errors in file /u01/app/oracle/diag/rdbms/generic/GENERIC/trace/GENERIC_ora_27564.trc  (incident=236721):

      ORA-07445: exception encountered: core dump [qctdatetimeconv()+47] [SIGSEGV] [ADDR:0x1] [PC:0x93A49B1] [Address not mapped to object] []

      Incident details in: /u01/app/oracle/diag/rdbms/generic/GENERIC/incident/incdir_236721/GENERIC_ora_27564_i236721.trc

       

      SQL> select * from v$version;

       

       

      BANNER

      --------------------------------------------------------------------------------

      Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

      PL/SQL Release 11.2.0.3.0 - Production

      CORE    11.2.0.3.0      Production

      TNS for Linux: Version 11.2.0.3.0 - Production

      NLSRTL Version 11.2.0.3.0 - Production

       

       

      I believe it must be a more elegant way to get around when character set (the second argument) is missing

      Could actually someone point me out if the second argument is mandatory?

       

      THanks,

      Dmitry.

        • 1. Re: getting data via XMLTYPE without the second argument causes SIGSEGV
          odie_63

          Could actually someone point me out if the second argument is mandatory?

          Yes, it is mandatory.

          The database has to know which encoding is used for the input file in order to load it correctly and convert data to the db charset (if necessary).

           

          If you don't know the encoding of the file, you can always assume one such as UTF-8, or the db charset itself that you can specify using nls_charset_id('CHAR_CS').

           

          That being said, the error you get is not expected. You should have received this :

          SQL> select xmltype(bfilename('DATA_DIR', 'units.xml')) from dual;

          select xmltype(bfilename('DATA_DIR', 'units.xml')) from dual

                 *

          ERROR at line 1:

          ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'

           

          which is much more clear.

          So I guess there's another problem going on here. You should report it to Oracle Support.