Hello
We have been observing some random warnings from AbstractSnapshotter class off recently, after we implemented some caching in our event store implemented.
While we don’t see functional impacts for this, we do see quite many errors like this.
ERROR 19404 — [DisruptorCommandBus-11] o.a.e.AbstractSnapshotter : An attempt to create and store a snapshot resulted in an exception.Exception summary: null
while the exception trace is not printed, after some workaround, following is some additional information i have
2023-12-19 19:07:22.890 ERROR 19404 — [DisruptorCommandBus-11] o.a.e.AbstractSnapshotter : An attempt to create and store a snapshot resulted in an exception.Exception summary: null
org.axonframework.eventsourcing.IncompatibleAggregateException: Aggregate identifier must be non-null after applying an event. Make sure the aggregate identifier is initialized at the latest when handling the creation event.
at org.axonframework.eventsourcing.EventSourcedAggregate.publish(EventSourcedAggregate.java:160) ~[axon-core-3.1.jar!/:3.1]
at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_372]
at org.axonframework.eventsourcing.EventSourcedAggregate.lambda$initializeState$1(EventSourcedAggregate.java:212) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.commandhandling.model.inspection.AnnotatedAggregate.lambda$execute$2(AnnotatedAggregate.java:174) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.commandhandling.model.AggregateLifecycle.lambda$execute$3(AggregateLifecycle.java:199) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.commandhandling.model.AggregateLifecycle.executeWithResult(AggregateLifecycle.java:166) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.commandhandling.model.AggregateLifecycle.execute(AggregateLifecycle.java:198) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.commandhandling.model.inspection.AnnotatedAggregate.execute(AnnotatedAggregate.java:174) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.initializeState(EventSourcedAggregate.java:209) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.eventsourcing.AggregateSnapshotter.createSnapshot(AggregateSnapshotter.java:126) ~[axon-core-3.1.jar!/:3.1]
at org.axonframework.eventsourcing.AbstractSnapshotter$CreateSnapshotTask.run(AbstractSnapshotter.java:173) ~[axon-shared-develop-984-SNAPSHOT.jar!/:3.1
Request any useful inputs or advice from axon experts.