[axonframework] Axon 4 - SAGA - Spring Cloud - IncompatibleAggregateException error

Hi Jose,

What the framework is telling you, is that you are not setting the Aggregate Identifier in your Aggregate after the Aggregate-creation-event has been published.

You are thus likely missing an @EventSourcingHandler annotated method for an Aggregate creation event handler entirely.

Or, you’ve missed the @AggregateIdentifier annotation on the field you state is the aggregate’s identifier.

After typing the above, I checked your repository.

The issue is that you’re using the @TargetAggregateIdentifier in your InvoiceAggregate instead of the @AggregateIdentifier.

If you change the annotation to the latter, the problem should be resolved.