I am new to axon and am helping to implement an inventory management system. We have a proof of concept setup with event sourced aggregates. Creating new aggregates with an initial state appears to work. When we try to post a ‘correction’ to an exisiting aggregate then things seems to fall apart. I have posted the error below:
17:55:26,683 WARN [org.axonframework.eventsourcing.eventstore.EmbeddedEventStore] (RMI TCP Connection(24)-192.168.56.1) Error reading snapshot. Reconstructing aggregate from entire event stream. Caused by: java.lang.NullPointerException null
17:55:26,689 WARN [org.axonframework.commandhandling.callbacks.LoggingCallback] (RMI TCP Connection(24)-192.168.56.1) Command resulted in exception: com.owfg.sim.pim.axon.prototype2.commandside.inventorydocument.commands.CorrectInventoryDocumentCommand: java.lang.NullPointerException
The error seems to indicate that it checks if there is a snapshot for this existing aggregate root first and then attempts to reconstruct it using its previously committed events. Since we have no snapshots then it would make sense it would go right to the event stream. The events for this aggregate root do exist and I am certain that I am using the correct UUID to obtain a ‘handle’ to it.
Meta Data associated with single event tied to the aggregate root:
. //business specific state information removed
I have bolded the aggregate identifier in the payload. Has anyone encountered something like this? Additionally, I can provide more information wrt our axon setup, but I am unsure where to start and do not want to bog down this post with unnecessary detail. If, however, something is requested then I would be more than happy to post it.
Thank you in advance,