I am querying an ignite cache like this:
try (QueryCursor<Cache.Entry<Long, IgniteAccountOrder>> qryCursor = cache.query(new ScanQuery<>())) {
qryCursor.forEach(
entry -> System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue()));
}
This works fine and the value gets serialized fine.
As soon as any filter is added to the query an exception occurs. Here is the exact same code with a filter that always returns true which is technically equivalent to the above code without any filter:
IgniteBiPredicate<Long, IgniteAccountOrder> filter = (key, p) -> true;
try (QueryCursor<Cache.Entry<Long, IgniteAccountOrder>> qryCursor = cache.query(new ScanQuery<>(filter))) {
qryCursor.forEach(
entry -> System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue()));
}
The following exception occurs with the second code:
Exception in thread "main" org.apache.ignite.client.ClientException: Ignite failed to process request [4]: Failed to deserialize object [typeName=java.lang.invoke.SerializedLambda] (server status code [1]) at org.apache.ignite.internal.client.thin.TcpClientChannel.convertException(TcpClientChannel.java:336) at org.apache.ignite.internal.client.thin.TcpClientChannel.receive(TcpClientChannel.java:296) at org.apache.ignite.internal.client.thin.TcpClientChannel.service(TcpClientChannel.java:218) at org.apache.ignite.internal.client.thin.ReliableChannel.lambda$service$1(ReliableChannel.java:165) at org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:763) at org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:731) at org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:164) at org.apache.ignite.internal.client.thin.GenericQueryPager.next(GenericQueryPager.java:93) at org.apache.ignite.internal.client.thin.ClientQueryCursor$1.nextPage(ClientQueryCursor.java:93) at org.apache.ignite.internal.client.thin.ClientQueryCursor$1.hasNext(ClientQueryCursor.java:76) at java.base/java.lang.Iterable.forEach(Iterable.java:74)