Java client Select query fails


#1

Executing select query with java client 3.0.26. Sometime it fetches the record and sometime it fails for the same query, It throws below exception

Exception in thread “main” com.aerospike.client.AerospikeException: Error Code 11: Query failed because cluster is empty. at com.aerospike.client.query.QueryExecutor.(QueryExecutor.java:47) at com.aerospike.client.query.QueryRecordExecutor.(QueryRecordExecutor.java:30) at com.aerospike.client.AerospikeClient.query(AerospikeClient.java:861) at service.impl.AerospikeServiceImpl.executeQuery(AerospikeServiceImpl.java:248)

Here is my code to execute query Statement statement = new Statement(); statement.setNamespace(namespace); statement.setSetName(set); statement.setBinNames(bins); statement.setFilters(filter); RecordSet rs = client.query(null, statement);