-
Notifications
You must be signed in to change notification settings - Fork 96
Error 1227: invalid document type on ordinary BaseDocuments #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
can you post some code, how the documents look like? Thanks |
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. Thanks! |
Released version 4.1.1 today with the encoding bugfix. |
Same error with driver 4.1.2 and 4.1.3. |
This issue is related to string byte size.
First one is working fine while second one throw exception. |
Thanks. I released version 4.1.4 with the fix. |
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)
`
The text was updated successfully, but these errors were encountered: