Author |
Message
|
alanromo |
Posted: Mon Jun 10, 2019 2:18 pm Post subject: IIB v10 Parser error codes 5032, 2 |
|
|
Newbie
Joined: 10 Jun 2019 Posts: 5
|
I have a message flow that I deploy on windows 10 and it works fine, but when I deploy it on linux I got an error on the MQ input node parser saying:
[Thread 2517] (Msg 1/1) BIP5004E: An XML parsing error 'The content of elements must consist of well-formed character data or markup.' occurred on line 1 column 4096 when parsing element '/Root/XMLNSC/ZORDERS1/IDOC/E1EDK17[2]/LKTEXT'. Internal error codes are '1519' and '2'.
Element: /Root/XMLNSC Internal error codes: 5032, 2. Line: 1, Column: 49
This error only happens with XML input messages bigger than 4096 chars. For smaller XML files it works OK.
And as I mentioned before, on Windows there are no problems with XML files bigger than 4096 chars.
I already changed the JVM memory values and the problem persists.
Any idea? |
|
Back to top |
|
 |
timber |
Posted: Mon Jun 10, 2019 2:57 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
The error message is saying that your XML document is not well-formed. It does not obey the syntax of a good XML document. The error has exactly nothing to do with the length of the input document.
Quote: |
I already changed the JVM memory values and the problem persists |
That was a waste of your time for the following reasons.
1. You could have looked up the error on Google, and you would have quickly realised that it wasn't linked to document size
2. Even if the error was linked to document size, did you really think that IIB has an inbuilt default maximum size of 4K!
3. IIB's parsers are not written in Java. They're implemented in C/C++ like the rest of the core product.
Any XML parser will reject the same document - save it to a file and load it into Firefox/Chrome/Edge and you will see a similar error in each case. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 4:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
timber wrote: |
The error message is saying that your XML document is not well-formed. It does not obey the syntax of a good XML document. The error has exactly nothing to do with the length of the input document.
Quote: |
I already changed the JVM memory values and the problem persists |
That was a waste of your time for the following reasons.
1. You could have looked up the error on Google, and you would have quickly realised that it wasn't linked to document size
2. Even if the error was linked to document size, did you really think that IIB has an inbuilt default maximum size of 4K!
3. IIB's parsers are not written in Java. They're implemented in C/C++ like the rest of the core product.
Any XML parser will reject the same document - save it to a file and load it into Firefox/Chrome/Edge and you will see a similar error in each case. |
Agreeing with everything my worthy associate has said and to forestall your obvious objection, I posit that the SAP system sending the message is putting an illegal character (in XML terms) to mark the end of a 4k block of IDOC and that's blowing the parser. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
alanromo |
Posted: Tue Jun 11, 2019 6:18 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2019 Posts: 5
|
Thanks for your comments.
As I mentioned in my original post. The big messages being rejected on Linux are well processed on Windows 10. The messages are well formed.
If I manipulate the messages making them smaller than 4096 chars they are well processed on linux as well. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 6:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alanromo wrote: |
As I mentioned in my original post. The big messages being rejected on Linux are well processed on Windows 10. The messages are well formed. |
So what SAP is inserting is a valid XML character in your Windows character set and not on Linux.
alanromo wrote: |
If I manipulate the messages making them smaller than 4096 chars they are well processed on linux as well. |
If by "manipulate" you mean "truncate from the 4097th character" I'm going to laugh. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 6:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Or....
Open a larger than 4096 character file in a Linux product with an XML parser or open such a file from Windows directly and without character conversion.
If the file opens and is parsed into an in-memory structure, then raise a PMR with IBM because you've found a bug in the Linux implementation of their XML parser. Which as @timber correctly points out, isn't written in Java.
You don't mention what version of IBM product or OS you're using but we rountinely parse XML documents received via MQ in the 10 - 12 Mb range using IIBv9 running RHEL 6. Our record is 25Mb (one off dump from an external vendor). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 6:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
OK, just noticed you have IIBv10 in your subject line.
Maybe you need to go back to v9 while IBM work on your PMR.......  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
alanromo |
Posted: Tue Jun 11, 2019 7:18 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2019 Posts: 5
|
I'll open a PMR
I'll keep you posted
Thanks a lot |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 7:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alanromo wrote: |
I'll open a PMR |
So it opens under the conditions I outlined? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
timber |
Posted: Tue Jun 11, 2019 8:19 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
If I manipulate the messages making them smaller than 4096 chars they are well processed on linux as well. |
How do you reduce the size? By removing some of the child tags in the document? If so, then I would guess that the illegal character was included as part of the content of the deleted records.
This unlikely to be a bug in the IIB XML parser. That's like blaming the compiler when your code doesn't work. The most likely explanation is
- the Linux input XML is in character encoding X
- IIB is trying to parse it in character encoding Y
This happens all the time, and you would be well advised to check this before spending a lot of time on a PMR. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 8:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
timber wrote: |
Quote: |
If I manipulate the messages making them smaller than 4096 chars they are well processed on linux as well. |
How do you reduce the size? By removing some of the child tags in the document? If so, then I would guess that the illegal character was included as part of the content of the deleted records. |
Vitor wrote: |
If by "manipulate" you mean "truncate from the 4097th character" I'm going to laugh. |
timber wrote: |
This unlikely to be a bug in the IIB XML parser. |
Especially as it works on my site.
timber wrote: |
The most likely explanation is
- the Linux input XML is in character encoding X
- IIB is trying to parse it in character encoding Y |
Vitor wrote: |
So what SAP is inserting is a valid XML character in your Windows character set and not on Linux. |
timber wrote: |
This happens all the time, and you would be well advised to check this before spending a lot of time on a PMR. |
Spoilsport - L1 could use a giggle.....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
alanromo |
Posted: Tue Jun 11, 2019 9:14 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2019 Posts: 5
|
I said "manipulate" because if I just said "truncate" It would mean that the message was bad formed.
I removed inner fields (different combinations on different messages) to make them smaller than 4096 chars.
I'll check the character encoding option |
|
Back to top |
|
 |
alanromo |
Posted: Tue Jun 11, 2019 10:52 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2019 Posts: 5
|
Problem solved
The tool offered by MQ on linux to inject string messages on the queue (amqsput) seems to have a char limit of 4096.
So you were right, since the message was being truncated the message was not well formed.
Now I'm injecting the message as a file and I can see the same behavior of Windows 10.
Thanks for all your comments!!!
(I didn't open the PMR... oh my!) |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2019 11:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alanromo wrote: |
The tool offered by MQ on linux to inject string messages on the queue (amqsput) seems to have a char limit of 4096. |
Couple of points:
- The amqsput application isn't a tool, it's one of the source code samples supplied with MQ and can be amended to any limit you want
- The last time I met it, it was delivered with a limit of 100 bytes so it's possible someone on your site has already amended it
- There are much better free tools in manipulate test messages in MQ (and some inexpensive ones if you have a budget), not just in terms of handling larger messages but a raft of other helpful options the sample doesn't have. Which I accept isn't hard as amqsput doesn't have any options, helpful or otherwise
- Told you it wasn't the parser _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|