Query returning a primitive type are expected to return exactly 1 result got 0

Hello all,

I am calling a query through java code which is something as follows:
Update myBucket
set hasFlag = true
where type like ‘boat’;

This query does not return anything and I do not want it to return anything, I just want to invoke this query every time a specific event happens which causes an exception “Query returning a primitive type are expected to return exactly 1 result got 0” but also there is a TimeoutException; null. Any clues how to fix this?

@CouchPatata can you please show us the full code and logs?