The proxy client cannot retrieve the result because it get a class cast exception. The generated code expects to receive a JsonArray with only JsonObject. This is true in local, but in remote, the JsonArray contains LinkedHashMap. I suspect an issue in the codec.
This commit is a fix for this case in the proxy template. It checks whether the object is an instance of map, and in this case, it creates the JsonObject and then creates the data object instance from the created JsonObject. Otherwise, the data object instance is created from the given JsonObject.
This is a weird issue
When running in distributed mode (so with -cluster) and with a service with such a method:
(
Data
is a valid data object)The proxy client cannot retrieve the result because it get a class cast exception. The generated code expects to receive a
JsonArray
with onlyJsonObject
. This is true in local, but in remote, theJsonArray
containsLinkedHashMap
. I suspect an issue in the codec.This commit is a fix for this case in the proxy template. It checks whether the object is an instance of map, and in this case, it creates the
JsonObject
and then creates the data object instance from the createdJsonObject
. Otherwise, the data object instance is created from the givenJsonObject
.