You can translate the question and the replies:

Charset encoding error when creating base view over HTTP Client JSON connection on Denodo

Hi, I am trying to create a base view over HTTP GET connection on JSON Datasource, test connection is fine and it is coming from api of denodo scheduler. I tested it on local envinorment it works ok with no errors but on Client environment it is throwing the follwing error. I check through some solutions posted here but no help. Can someone please help me with this? **Unable to obtain the data structure: com.denodo.util.exceptions.InternalErrorException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (InputStreamReader); line: 1, column: 2]** We went throgh logs and they were not helpful either. Thank you -Siree Godavarthi
user
23-05-2022 02:16:29 -0400
code

4 Answers

Hi, The error ‘Unexpected character (‘<’ (code 60))’ usually occurs when the format of the JSON is incorrect (or) the URL might be pointing to a format other than a JSON such as HTML or XML. I was able to overcome this issue by explicitly providing the format type as JSON by adding ‘**?$format=json**’ at the end of the API URL while creating the base view from the [JSON data source](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/generating_wrappers_and_data_sources/creating_data_sources/json_sources). You could also refer to a similar Community [Q&A](https://community.denodo.com/answers/question/details?questionId=9064u000000CfBwAAK&title=IGC+API+CALL) for more information. Hope this helps!
Denodo Team
23-05-2022 09:04:07 -0400
code
I tried using the format=json and it doesnt work and still has the same error. We tried it on our local enviornment and in our server and it works fine. There we tried copying the get request we are getting from swagger to get the list of jobs from denodo scheduler into browser and it is in xml format. Our local and server environment can read them as JSON and create a base view out of it. The client envinorment is showing the error when creating base view from http content. We tried creating XML view instead and the attached error is showing up. Can you please suggest any other options we tried all possible ones? Thanks in advance
user
24-05-2022 07:28:16 -0400
Hi, In this scenario, I would try setting the ‘Charset encoding’ option to UTF-8 manually in the ‘Edit HTTP Connection’ window of the data source. Furthermore, I would try to troubleshoot the error by checking the <DENODO_HOME>/vdp/**vdp.log** file for any error messages. Additionally, I would also elevate the logger level of the ‘http.CommonsHttpClientConnection’ property to ‘**DEBUG**’ by executing the following command in VQL Shell, reproduce the issue, revert back the logger level to ‘ERROR’ and then check the vdp.log file for relevant log entries. > call LogController ('com.denodo.parser.connection.http.CommonsHttpClientConnection','debug'); > call LogController ('com.denodo.parser.connection.http.CommonsHttpClientConnection','error'); If you still need help and if you are a valid Support user, please create a Support case at [Denodo Support Site](https://support.denodo.com/) so that our Team will help you further. Hope this helps!
Denodo Team
25-05-2022 06:07:23 -0400
code
Thank you for the response everybody. I got this issue solved. Issue is with proxy being ON on the connection. In detail, we are trying to get data from denodo scheduler into a JSON source and save as views on design studio. We got the http get request to create connection from Swagger UI of scheduler available in community. It worked out well in our local environment, throwed above error when doing the same on client envi. proxy config was not needed for internal links(denodo scheduler) and that was stripping off the http headers.
user
30-05-2022 04:05:16 -0400
You must sign in to add an answer. If you do not have an account, you can register here