IBM Support

LI72650: XML DOCUMENT WITH UTF-8 BOM BUT WITHOUT ENCODING DECLARATION FAILS WITH SQL16132N.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • XML Document with UTF-8 byte order mark (BOM) but without
    encoding declaration fails to be inserted with SQL16132N.
    Both of the following sequences should be treated as valid XML
    document structure.
    .
    Byte order mark and encoding declarations            Result
    ---------------------------------------------------  ---------
    x'EFBBBF' + <?xml version="1.0" encoding="UTF-8" ?>  OK
    x'EFBBBF' + <?xml version="1.0" ?>                   SQL16132N
    .
    The following steps illustrate one of the scenario to cause this
    problem.
    .
    data.xml
    --------
    x'EFBBBF' + '<?xml version="1.0" ?><a>Hello</a>'
    .
    xml.del
    -------
    "<XDS FIL='data.xml' />"
    .
    $ db2 create table T1(C1 xml)
    $ db2 import from xml.del of del insert into T1
    .
    SQL3148W  A row from the input file was not inserted into the
    table.
    SQLCODE "-16132" was returned.
    .
    SQL16132N  XML document contains an invalid document structure.
    SQLSTATE=2200M
    

Local fix

  • Please remove UTF-8 BOM if the XML document does not contain
    encoding declaration, or specify encoding declaration if the XML
    document is followed by UTF-8 BOM.
    

Problem summary

  • Users affected:
    Users who handle XML documents with UTF-8 BOM but without
    encoding declaration.
    .
    Problem Description:
    If this APAR is not applied,
    XML documents with UTF-8 BOM but without encoding declaration
    cannot be inserted with SQL16132N.
    Problem Summary:
    XMRP does not treat XML documents which does not have xml
    declaration.
    

Problem conclusion

  • First fixed in DB2 Version 9.5, FixPak 2 (s080811).
    

Temporary fix

  • Please specify XML encoding declaration when the XML documents
    have BOM.
    

Comments

APAR Information

  • APAR number

    LI72650

  • Reported component name

    DB2 EDE LINUX

  • Reported component ID

    5724N7604

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-01-16

  • Closed date

    2008-08-27

  • Last modified date

    2008-08-27

  • APAR is sysrouted FROM one or more of the following:

    LI72611

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • ENG_XMRP
    

Fix information

  • Fixed component name

    DB2 EDE LINUX

  • Fixed component ID

    5724N7604

Applicable component levels

  • R950 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"950","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 October 2021