Exception in spring data during processing event


During processing of org.axonframework.eventhandling.EventHandler, events are going to be save in MongoDB 4.0 by spring data repository. But they can’t since since an exception is thrown:

Caused by: com.mongodb.MongoCommandException: Command failed with error 263 (OperationNotSupportedInTransaction): ‘Cannot create namespace axxalon-app-document.documentView in multi-document transaction.’

Hi Stanislav,

I am afraid I need more information to help you further with the problem at hand.

You’re stating that during the processing of an event handler, your storing events in a MongoDB.
Does that mean you have an @EventHandler annotated method, which in turn will call a Mongo repository to store the event in?

Next to that, I’d like to know which Axon Framework version you’re using.
Note that as of the Axon Framework release 4.0, the Mongo components have been moved to the Mongo Extension repository.

And, would you be at leisure to provide the entire stack trace instead of just the ‘caused by’ line?
I think that might clarify from which specific point the problem occurs, potentially getting to a resolution of the issue.

Lastly I’d like to point out, that if this turns out to be a Mongo or Spring Data specific problem, that using either of those forums to discuss the problem might be better suited.

Let’s figure out what’s the matter Stanislav!