com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:225)
at com.google.gson.Gson.fromJson(Gson.java:991)
at com.google.gson.Gson.fromJson(Gson.java:956)
at com.google.gson.Gson.fromJson(Gson.java:905)
at com.google.gson.Gson.fromJson(Gson.java:876)
at org.gbif.nameparser.ParserConfigs.loadFromCLB(ParserConfigs.java:129)
at life.catalogue.WsServer.run(WsServer.java:262)
at life.catalogue.WsServer.run(WsServer.java:108)
I have hacked the Varnish configuration to allow it to start up:
sub recv_api {
# To allow loading this during startup
if (req.url ~ "^/parser/name/config") {
return(synth(898, "Not yet available"));
}
...
}
...
vcl_synth {
...
# Provide configuration even if the webservice is down.
if (resp.status == 898) {
set resp.reason = "OK";
set resp.status = 200;
set resp.http.Content-Type = "application/json";
set resp.body = std.fileread("/home/col/bin/configs/NameParserCLB.json");
return(deliver);
}
}
I've left this configuration in place (though not committed) in case another restart is necessary.
During startup:
It tries to load configuration from https://api.checklistbank.org/parser/name/config?limit=1000, but this is provided by this service.
I have hacked the Varnish configuration to allow it to start up:
I've left this configuration in place (though not committed) in case another restart is necessary.
NameParserConfig.json