Problem Description:


Schema crawl in REST API Generic source fails with the below error in $IW_HOME/platform/logs/queryservice.log


020-07-08 09:31:39,553 INFO  [vert.x-worker-thread-17] stub.GenericRestUtility:224 : Failed to create /iw/sources/REST_TEST/iw/sources/assets//restsample/be18a8e3-5655-4e72-8e94-50250d27d226.json

2020-07-08 09:31:39,554 ERROR [vert.x-worker-thread-17] restapi.RestAPIIngestionService:116 : error: java.lang.RuntimeException: org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

 at [Source: java.io.StringReader@3a4cedfb; line: 1, column: 2]

    at infoworks.tools.stub.GenericRestUtility.dumpData(GenericRestUtility.java:225)

    at infoworks.tools.stub.GenericRestUtility.dumpSampleData(GenericRestUtility.java:314)

    at infoworks.tools.QueryServiceUtility.query.service.restapi.RestAPIIngestionService.getFlatSchema(RestAPIIngestionService.java:86)

    at infoworks.vertx.service.RestApiController.lambda$getFlatSchema$4(RestApiController.java:92)

    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:272)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

    at java.lang.Thread.run(Thread.java:748)


Root Cause: This issue happens if the Authorization details for the REST API are not provided in the Request Headers section undet the Schema Details for the table.


Solution: Provide the Authorization details under the Request Headers, click on Save and Crawl Schema. This should resolve the issue.



Applicable Infoworks DataFoundry Versions:

v2.9.x,v3.1.x