Skip to Content
0
Former Member
Nov 25, 2022 at 02:47 PM

SAP Business One B1i - Invalid JSON returned

95 Views Last edit Nov 25, 2022 at 02:50 PM 2 rev

We have a very intensive exchange of data between or production software and SAP Business One HANA using the SAP Business One Integration Framework technology and many scenarios.

We encouter since the beginning a few number of invalid JSON reply per day from the integration framework without having any idea of where the problem comes from. It is not related to one specific scenario.

As an example, the following JSON is sent to SAP:

{ "QUBES": [ { "NoOF": 20211172 }, { "NoOF": 20212272 }, { "NoOF": 20220222 }, { "NoOF": 20220233 }, { "NoOF": 20220281 }, { "NoOF": 20220289 }, { "NoOF": 20220298 }, { "NoOF": 20220302 }, { "NoOF": 20220377 }, { "NoOF": 20220402 }, { "NoOF": 20220411 }, { "NoOF": 20220424 }, { "NoOF": 20220453 }, { "NoOF": 20220465 }, { "NoOF": 20220470 }, { "NoOF": 20220501 }, { "NoOF": 20220523 }, { "NoOF": 20220526 }, { "NoOF": 20220534 }, { "NoOF": 20220574 }, { "NoOF": 20220586 }, { "NoOF": 20220599 }, { "NoOF": 20220626 } ]}

But unfortunately, randomly B1i will reply an invalid JSON structure like below (I have cutted the end of the JSON to avoid too much text). As you can see the beginning of the JSON is completely invalid ("\n\n", random comma, etc.). This is not always the same invalid structure. Sometimes it is in the middle of the reply, sometimes at the end, etc.

It mostly seems to happen when the server is under multiple concurrent access. See below the replies I've got sometimes from Integration Framework:

\n\n,{ , "Header": { "Status": "0", "Message": "OK" }[ {

Any idea where it comes from and how to solve it? Did someone ever encoutered this kind of problem?

We are using SAP Business One 9.3 PL 12

We tried updating Integration Framework. I even had a look at Apache Tomcat patch notes to see if it may comes from this but I found nothing on the web.