Event Storage Exception.


I am getting the following exception while generating an event.

2017-10-19 23:30:29.065 WARN 53247 — [ main] o.a.c.gateway.DefaultCommandGateway : Command ‘com.ultimate.ssmp.preopen.executereports.commands.StartPreOpenCommand’ resulted in org.axonframework.eventsourcing.eventstore.EventStoreException(An event for aggregate [924d545b-396b-4b17-8f89-03f53be254d7] at sequence [0] could not be persisted)

I am using MongoRepo for storing all the events. Not sure what the exact problem is.

When sending a command, you get a CompletableFuture. That will hold the exact reason why the command failed. Calling “get()” on it will return the result of the command handler method (likely null) or otherwise throw the exception that caused the command to fail.

Axon doesn’t log all the exception details, because those are already provided as a return value (thus preventing duplicate logging).