Description
When creating new documents using the BaseDocument class occassionally an ArangoDBException gets thrown warning of an invalid document type. This happens when runnig ArangoDB 3.1RC2 with arangodb-java-driver 4.0.0 (vpp)
It appears to be related to the amount of data sent. Document's that generate this error all have a document.properties.toString.length of ~240 characters.
Additionally, occasionally a java.io.IOexception (reached the end of the stream) can get thrown, this time with a document.properties.toString.lenght of ~284 characters.
Relevant stacktraces:
com.arangodb.ArangoDBException: Response: 400, Error: 1227 - invalid document type
at com.arangodb.internal.velocystream.Communication.checkError(Communication.java:104)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:122)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:42)
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:58)
at com.arangodb.ArangoCollection.insertDocument(ArangoCollection.java:77)
com.arangodb.ArangoDBException: java.io.IOException: Reached the end of the stream.
at com.arangodb.internal.velocystream.ConnectionSync.write(ConnectionSync.java:111)
at com.arangodb.internal.velocystream.CommunicationSync.send(CommunicationSync.java:137)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:119)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:42)
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:58)
at com.arangodb.ArangoCollection.insertDocument(ArangoCollection.java:77)
`