Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Error 1227: invalid document type on ordinary BaseDocuments #65
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.
com.arangodb.ArangoDBException: java.io.IOException: Reached the end of the stream.
I can provide a bit more detail now. I'm storing BaseDocuments that I can store without any issue using the arangodb-java-driver 3.1.0.
Using driver 4.1.0 documents that cotain strings with non-ASCII characters such as "·ÃÂ " consistently fail. I'm not getting an error message, but the documents don't get stored in the database. The _key I defined in the document does get reserved (so attempting to insertDocument with the same key will fail with error message)
Another document I'm not able to store consistently (possibly because of the slashes?) is as simple as
For the time being, I'll stick to driver 3.1.0 - please let me know if you need any more information.
Fixed a bug which was responsible for the problem with non-ASCII characters. This should work now in version 4.1.1-SNAPSHOT. (I release it as soon as we found the other bug)
I also tried to reproduce your other problem with the example document you posted, but I was not be able to reproduce it. I commited the test in branch 4.1 which you can find here. In this test I created the document as plain json and as BaseDocument. Maybe you can take a look at it and let me know what I have to change to get the error you got.
This issue is related to string byte size.
First one is working fine while second one throw exception.