Hi Harvey,
this error occurs when a transaction cannot be committed, because it has been marked as “rollback only”. Hibernate does this automatically when an operation on the EntityManager (such as a query) fails to execute. This may be the case in your Event Handlers that update the query model, or by Axon when it’s inserting an Event in the EventStore.
Exceptions in Event Handlers are logged by default. If there is an error in command handling, it is reported as a result of the command. Do you use the CommandGateway or the CommandBus to dispatch your commands. Do you use Sagas? If so, which one do they use?
Make sure you log the (Exception) result of commands send. Axon doesn’t log these (since it reports them using the API). Note that the CommandGateway.send() method returns a CompletableFuture. You can use that CompletableFuture to discover if there are any errors processing a command.
Hope this helps.
Cheers,
Allard