0
votes

Trying to invoke:

QueryCriteria linearStateCriteria = new QueryCriteria.LinearStateQueryCriteria(null,null,Arrays.asList(externalId),Vault.StateStatus.UNCONSUMED);
connection.getProxy().vaultQueryByCriteria(linearStateCriteria,SomeState.class);

getting exception:

Serialization failed direction="Serialize", type="net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria", msg="Defined getter for parameter contractStateTypes returns type java.util.Set<java.lang.Class<? extends net.corda.core.contracts.ContractState>> yet underlying type is java.util.Set<java.lang.Class<? extends net.corda.core.contracts.ContractState>>", ClassChain="java.util.List<*> -> net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria"

Looks like bug in serialization in client rpc. If somebody faced this issue or this is a known bug please advice.

Thanks.

1
Could you let us know what version RPC client are you using, and what version node are you trying to connect to, and whether you are using the Open Source or Enterprise distributions?Anthony Keenan
Hi Anthony, I'm using open source version 4.0 for both, node and rpc client. I've created gateway based on spring boot 2.1. Flows execution behaves well. Simple vault query as well. Vault query by criteria fails with serialization exception.shpitc
Thrown from: net.corda.client.rpc.internal.RPCClientProxyHandler line 257. val serialisedArguments = (arguments?.toList() ?: emptyList()).serialize(context = serializationContextWithObservableContext)shpitc

1 Answers

0
votes

As mention in this question: Corda 4.0 transaction serialization issue It is not necessarily a serialization issue, rather it is the java.util.Set class not get properly picked up.

It's caused by a bug in certain versions of Guava. As stated in the other question, it is fixed by the later releases.