Problems serializing LocalDateTime from EventStore

My aggregate and some of my commands/events utilize the new JDK 8 LocalDateTime class.

So far in my program - I’m using the FileSystemEventStore to back an EventSourcingRepository, and when I try to run a command on an already-existing aggregate, it fails on initial load with this exception:

“com.thoughtworks.xstream.converters.ConversionException: Cannot convert type java.time.Ser to type java.time.LocalDateTime”

It seems like the xstream library is choking on LocalDateTime - I’m assuming because it’s relatively new with JDK 8? I’m also not sure why it serialized LocalDateTime to java.time.Ser - or what that class is…

Any ideas on a possible workaround? Is it possible this problem doesn’t exist on one of the other event store implementations like JPA?

I plan to try this out with the old Java Date class instead of LocalDateTime to see if that fixes it - but I really want to use the new JDK 8 API in my aggregate.

Thanks for any help!

Hi Chris,

perhaps this post has your answer?

Seems to be an issue related to XStream.


That helps. Thanks!