- Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
arangodb-java-driver version: 5.0.3
arangodb version: 3.4.0-rc.5
There is an exception while batch insert of documents when silent mode is used:
List<BaseDocument> docs = ... ... DocumentCreateOptions docCreateOpts = new DocumentCreateOptions() .silent(true) .overwrite(overwrite) .returnNew(false) .returnOld(false); db.collection("collection").importDocuments(docs, docCreateOpts);
com.arangodb.ArangoDBException: com.arangodb.velocypack.exception.VPackValueTypeException: Expecting type ARRAY at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:74) at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:63) at com.arangodb.internal.ArangoCollectionImpl.insertDocuments(ArangoCollectionImpl.java:97)
The possible solution is to omit proceeding multidocument response body in method:
com.arangodb.internal.InternalArangoCollection#insertDocumentsResponseDeserializer
:
... final VPackSlice body = response.getBody(); if (body.isArray()) { for (final Iterator<VPackSlice> iterator = body.arrayIterator(); iterator.hasNext();) { .. } } ...
Metadata
Metadata
Assignees
Labels
No labels