LocalDate deserializer expects either a String or a Velocypack date: https://github.com/arangodb/java-velocypack-module-jdk8/blob/014c07cb736aea6b2b0fd99fbea51fa9efccf411/src/main/java/com/arangodb/velocypack/module/jdk8/internal/VPackJdk8Deserializers.java#L51-L54
You can use it as shown here: https://github.com/arangodb/java-velocypack-module-jdk8/blob/014c07cb736aea6b2b0fd99fbea51fa9efccf411/src/test/java/com/arangodb/velocypack/module/jdk8/VPackTimeTest.java#L207-L219 If you want anyways to deserialize your custom data structures, you can register a specific deserializer for it: https://www.arangodb.com/docs/stable/drivers/java-reference-serialization.html#custom-serializer Best Regards, Michele Rastelli On Tuesday, 23 March 2021 at 18:40:06 UTC+1 [email protected] wrote: > I forgot to mention that I have in my dependencies the volicypack jdk8 > module... > > On Tuesday, March 23, 2021 at 5:24:08 PM UTC+1 jean safar wrote: > >> Hi, >> >> Apologies in advance if I have missed a message on the topic (I did a >> search). >> >> I am running a first junit test on arango and I am getting an exception >> when getting a document with the key after I stored it. >> >> The message is: >> >> java.util.concurrent.ExecutionException: com.arangodb.ArangoDBException: >> com.arangodb.velocypack.exception.VPackParserException: >> java.lang.InstantiationException: java.time.LocalDate >> >> The object stored is: >> >> {"id":"1","json":"json","actor":"toto","date":{"year":2021,"month":3,"day":23}} >> >> The date field is of type LocalDate. ... >> >> it fails in the call: collection.getDocument(key, TestClass.class).get(); >> >> There is a setter and getting for that field. >> >> Thanks in advance- >> > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/33fbb500-3033-41fc-9914-be4fcec9f52dn%40googlegroups.com.
