Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
ghassan1
Partner - Contributor II
Partner - Contributor II

DB2 XML COLUMN Getting internal Error cannot parse

Hi,

I have created log stream based task that reads from DB2 LUW(source end point) and loads in DB2 LUW(ODBC target end point). Type of 1 column in source is XML, in Transform column type appears CLOB . Running task in full load, and getting error could not parse XML , invalid EOF internal error. 

Taks structure:
task 1: source DB2 -> logstream 

task 2: DB2 source (with logstream of task 1) -> odbc(target DB2)

getting error in task 2

If anyone faced similar error please do guide how to handle XML column in Qlik Replicate.

 

Thanks

 

Labels (2)
8 Replies
john_wang
Support
Support

Hello @ghassan1 ,

We need some additional information to better understand the issue:

  1. Does the error occur during the Full Load phase, the Change Processing phase, or both?
  2. What is the exact error message?
  3. Can you test a direct flow from the IBM DB2 source to a DB2 ODBC target (without using LogStream)?
  4. Are you able to confirm that the data contains valid XML?
    • The XML may be corrupted due to truncation or invalid characters etc.
  5. What's the subtype you selected?

john_wang_0-1777596925032.png

 

Note: Support for a native DB2 LUW target endpoint in Qlik Replicate is planned for version 2026.5, which is expected to be released within the next few weeks.

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
ghassan1
Partner - Contributor II
Partner - Contributor II
Author

Hi john_wang,

Thanks for providing your response on this, please find below my inline response on asked questions 

  1. Does the error occur during the Full Load phase, the Change Processing phase, or both? [ error occurring in both ]
  2. What is the exact error message? [Internal error occurred in XML parser. parser error is Gen_UnexpectedEOF. SQLSTATE= 2200M [1022502] ar odbc_stmt.c 2846]
  3. Can you test a direct flow from the IBM DB2source to a DB2 ODBC target (without using LogStream)? [Tested direct and logstream both. Getting same error]
  4. Are you able to confirm that the data contains valid XML?
    • The XML may be corrupted due to truncation or invalid characters etc.[SOURCE has same datatype we are simply replicating data without any transformation, sourcr data type is also XML]
  5. What's the subtype you selected? [it is CLOB AND SUBTYPE IS REGULAR, I trued with subtype XML BUT same issue]

regards,

john_wang
Support
Support

Hello @ghassan1 ,

The behavior could not be reproduced with a simple sanity test. For example:

CREATE TABLE testxml(
id INTEGER NOT NULL PRIMARY KEY,
name CHAR(20),
xxml XML
);

INSERT INTO testxml
VALUES (2, 'JohnW', '<?xml version="1.0"?> <name>JohnW</name>');

 

This scenario works as expected with Qlik Replicate. Full Load results:

john_wang_0-1777819676643.png

Given this, I recommend opening a support ticket and including:

  • the table DDL
  • a small set of sample data (source and target, if possible)

This will allow for a more thorough investigation of the issue.

thanks,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
ghassan1
Partner - Contributor II
Partner - Contributor II
Author

Hi @john_wang ,

Thanks for detailed explanation really appreciate.

I was also working on finding solution to this. Currently data type of column is XML Not Null. When I changed it to accept Nulls it worked fine and XML column data is also populate with exact values that source has. One more thing I noticed is that XML is missing last closing bracket > .

 

when I am changing it back to NOT NULL error occurs, 

john_wang
Support
Support

Hello @ghassan1 ,

Thanks for the detailed information however the behavior still cannot be reproduced in my labs:

CREATE TABLE testxml(
id INTEGER NOT NULL PRIMARY KEY,
name CHAR(20),
xxml XML NOT NULL
);

INSERT INTO testxml
VALUES (2, 'JohnW', '<?xml version="1.0"?> <name>JohnW</name>');

If you can provide the source table creation DDLs (for both source and target sides) and sample data then I'd like to investigate it deeper.

thanks,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
ghassan1
Partner - Contributor II
Partner - Contributor II
Author

Hi @john_wang ,

please find below details:

Database: DB2 LUW 11.5

table DDL: creare table schema.table ( batid int not null, batch id int not null, xml_data XML not null) organised by row

same DDL deployed on target Database ( Same version of DB2 as source)

XML sample data:

<notif batno=“”  <msg> Arabic text here </msg> <notif

please note above last ending closing tag is missing in sourcr xml data

Task settings:

Full load task:

source (db2 Luw) -> target (odbc for db2 Luw)

settings: metadata-> allow unlimited LOB COLUMNS chunk size 128 KB

COLUMN TYPE In transform

CLOB Regular

also tried 

CLOB XML

 

Can you please share you task settings may be it could help resolve issue.

Thank you.

 

DesmondWOO
Support
Support

Hi @ghassan1 ,

It looks like the error was triggered by the following setting:
Allow unlimited LOB COLUMNS, chunk size 128 KB.

Please switch to “Limit LOB size” and test again.

If you must continue using the unlimited LOB option, kindly raise a support ticket so we can consult with R&D.

Regards,
Desmond

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @ghassan1 , copy @DesmondWOO 

I’m not sure whether this is the actual data row from the source or something else, but the XML is invalid. There are several issues:

john_wang_0-1777900556580.png

  1. Missing closing bracket for the opening tag
    The <notif> tag is not properly closed with >.
  2. Invalid attribute quotes
    The quotes used are curly (“”), which are not valid in XML. They should be standard double quotes ("").
  3. Incorrect closing tag
    The closing tag is missing the / and should be </notif>.
  4. Malformed tag structure
    The final tag is incomplete and missing the closing >.

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!