Hi we are using Virtuoso in our portal, and when the system is trying the query so it can proccess the data, we get the followed error:
2020-05-21 15:01:37,730 [main] INFO semantic.sync.SemanticSyncProcess - Trying query: http://datosgob-dev.digitalchannels.technology/virtuoso/sparql?query=select+distinct+%3FdatasetCount+where+%7B+graph+%3Chttp%3A%2F%2Fdatosgob-dev.digitalchannels.technology%2Fcatalogo%3E+%7B+%3Fx+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2Fextent%3E+%3FdatasetCount+%7D%7D&format=json
2020-05-21 15:01:37,764 [main] ERROR semantic.sync.SemanticSyncProcess - There was an error manipulating the JSON object.
org.json.JSONException: A JSONObject text must begin with '{' at 0 [character 1 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:505)
at org.json.JSONObject.<init>(JSONObject.java:214)
at org.json.JSONObject.<init>(JSONObject.java:357)
at semantic.sync.Utils.datasetsCountVirtuoso(Utils.java:180)
at semantic.sync.SemanticSyncProcess.main(SemanticSyncProcess.java:221)
2020-05-21 15:01:37,765 [main] INFO semantic.sync.SemanticSyncProcess - -1 datasets in Virtuoso
2020-05-21 15:01:37,765 [main] ERROR semantic.sync.SemanticSyncProcess - The number of datasets in Virtuoso is less than or equal to 0. Something went wrong.
2020-05-21 15:01:37,765 [main] INFO semantic.sync.SemanticSyncProcess - End of process
The JSON that is giving as a response is:
{ "head": { "link": [], "vars": ["datasetCount"] },
"results": { "distinct": false, "ordered": true, "bindings": [ ] } }
We’ve seen there’s a line break before the “{” making this the line 1 instead of line 0.
We have checked with another example and they have the same line break and everything works perfectly, so we don’t longer believe there’s a relation with the line break. However, we have kept checking all our config and we still don’t understand why this is not working.
Any help is welcome.
Thank you.