IBM Support

[AutoREST] During scan, expected JSON token but saw '\u001F' at row 0, column 1, offset 1

Troubleshooting


Problem

When attempting to connect to a REST datasource using 'Progress DataDirect Autonomous REST connection' you may receive an error saying:
XQE-DS-0006 Unable to logon to the data source.
[IBM Cognos][AutoREST JDBC Driver][AutoREST]During scan, expected JSON token but saw '\u001F' at row 0, column 1, offset 1
 

Cause

The datasource endpoint in use for this example was Oracle Fusion and it was returning binary encrypted data, henceforth the reference to '\u001F' in the error on the first line/column of the response.
The Progress driver sends the request includes the "Accept-Encoding" header, which is set to "gzip, x-gzip, deflate". More information available here:

When testing in Postman, it appears that when "x-gzip" header is included, the response from the Oracle Fusion endpoint causes a JSON response issue. Meaning, the driver attempts to parse the JSON response, but fails due to the data "'\u001F' at row 0, column 1, offset 1".
Oracle imply that they support this type of encoding, (“The API Gateway supports HTTP content encoding for the gzip and deflate compressed content encodings”), so therefore this is an issue that should be raised to the datasource endpoint, in this case, Oracle Fusion team.
https://docs.oracle.com/cd/E50612_01/doc.11122/user_guide/content/common_compress_encoding.html

Diagnosing The Problem

Please validate the connection works via POSTMAN. Additionally you may enable a HTTP trace from the Dispatcher to work out what the JSON request looks like in order to imitate the same request via POSTMAN.

Resolving The Problem

As explained above, as this issue is a datasource vendor issue, please reach out to your REST datasource vendor to work out why the response is encoded.
Workaround:
For Oracle Fusion, since we know there's an issue with the endpoint not able to parse the x-gzip header, we may be able to workaround this. There is an undocumented Progress driver name-value pair which causes it to set Accept-Encoding to nothing (WSCompressData=none;). 
Example:
Please note that as this is undocumented, there's a potential for this to not continue to work in the future. Also, you'll need to test it carefully to make sure that the JSON response is expected (test with POSTMAN).

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m50000000Cl6nAAC","label":"Data Source"}],"ARM Case Number":"TS009886499","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
29 August 2022

UID

ibm16616221