VelocityPack Java Driver Deserialization Issue

44 views
Skip to first unread message

Scott B.

unread,
Apr 12, 2017, 3:33:43 PM4/12/17
to ArangoDB
Has anyone had issues using the Java driver (4.1.11) against ArangoDB Server (3.1.17) running on the MS Azure flavor of Ubuntu 16.04 LTS?  I am seeing some extremely odd behavior.

It appears that if one of my POJOs I grab from ArangoDB has a Float or Double value, but the value in the database doesn't have a decimal point (e.g. it is just 12000 instead of 12000.1), then the POJO property is deserialized as Float.POSITIVE_INFINITY.  However, if I simply directly edit the record using the ArangoDB web interface and add a significant digit after the decimal, then it works fine (e.g. 12000.1).

Now for the really weird part.  I have no issues on my local development machine (running Linux Mint 18, which is based on Ubuntu 16.04 LTS).  Both machines are running the same JDK (OpenJDK 1.8.0_121), the same version of ArangoDB (3.1.17), the same ArangoDB java driver (4.1.11), and even the same version of Tomcat (8.0.32).  My guess it it has something to do with a system library that ArangoDB and/or VelocityPack rely on that is different between the two systems, but I'm not sure where to start.  They are both running the same version of libc6, which is the most obvious dependency I could find.

Does anyone have any ideas?

Scott B.

unread,
Apr 12, 2017, 6:31:09 PM4/12/17
to ArangoDB
Hmmm...  I actually am able to reproduce it on my local development box:

1.  Using a Java app, create a document from a POJO containing a Float property.
2.  Using a Java app, create a second POJO.
3.  Using the ArangoDB web GUI, paste the contents of the first document into the second document.
4.  Open the second document in Java, notice the value of "Infinity" once it is deserialized into a POJO.

Again, the above is all with VPack.

That being said, I still have no idea how to fix it.  But at least I can reliably reproduce it.

mpv1989

unread,
Apr 13, 2017, 5:28:27 AM4/13/17
to ArangoDB
Thanks for reporting this bug. I was already able to find and fix it.

You can test it with the snapshot version `4.1.12-SNAPSHOT`. I also released version `4.1.12` which should be available on maven central repo within the next hours.

Best
Mark

Scott B.

unread,
Apr 13, 2017, 12:34:00 PM4/13/17
to ArangoDB
Yep, the new version fixed it.  Thank you!
Reply all
Reply to author
Forward
0 new messages