I am facing the famous “Cannot retrieve current AggregateLifecycle; none is yet defined” error.
I already checked all the possible errors: using an apply outside of the aggregate, creating myself an aggregate instead of letting the repository doing it etc… In theory everything has been correctly applied.
Yet I can see this error occurs only when an aggregate cache (a custom implementation of AbstractCacheAdapter using either a local map or Guava) has been set up. The weirdest thing is that when I use a Hazelcast map instead (by autowiring a Map), the same code is working.
I guess something is going wrong here. The resources map has only one key named org.axonframework.eventsourcing.CachingEventSourcingRepository@4fd63c43_AGGREGATES, not “ManagedAggregates”.