An com.arangodb.ArangoDBException is thrown when trying to close a streaming batched cursor.
Such as
try(ArangoCursor<Map> cursor = db.query("FOR el in collection RETURN el",
Map.class,
new AqlQueryOptions()
.ttl(3600)
.batchSize(2)
.stream(true))) {
while(cursor.hasNext()) {
log.info("{}", cursor.next());
}
} catch (IOException e) {
throw new RuntimeException(e);
}
This code throws an error when closing the cursor after the try-with-resources block is finished.
com.arangodb.ArangoDBException: Response: 404, Error: 1600 - cursor not found
at com.arangodb.ArangoDBException.of(ArangoDBException.java:137)
at com.arangodb.ArangoDBException.of(ArangoDBException.java:111)
at com.arangodb.ArangoDBException.of(ArangoDBException.java:107)
at com.arangodb.internal.net.CommunicationProtocol.execute(CommunicationProtocol.java:43)
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:55)
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:43)
at com.arangodb.internal.ArangoDatabaseImpl$1.close(ArangoDatabaseImpl.java:216)
at com.arangodb.internal.cursor.ArangoCursorImpl.close(ArangoCursorImpl.java:60)
An
com.arangodb.ArangoDBException
is thrown when trying to close a streaming batched cursor.Such as
This code throws an error when closing the cursor after the
try-with-resources
block is finished.