Error on aggregate [sdfds]. Cannot reuse aggregate identifier [sdfds] to create aggregate [GiftCard] since identifiers need to be unique

Hallo Gerad,

thank you for the help, I did a lot of changes to the project because when I did the change you proposed I directly got the error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘giftCardRepository’: Failed to instantiate [org.axonframework.modelling.command.Repository]: Factory method ‘repository’ threw exception with message: Default configuration requires the use of event sourcing. Either configure an Event Store to use, or configure a specific repository implementation for class io.axoniq.demo.giftcard.command.GiftCard

I saw a post on your webside now which explains the error: Axon 4.5.16, Spring Boot 3.2.2 and Java 21, the application does not start
But there was no solution for this problem posted there. I tried higher axon versions until axon 4.9.4 but still got the error with the “repository”

Then I looked up some other axon projects which are working with a database and in all there was a configuration class which configured the database, a transaction manager, jpa Properties, entityManagerFactory like I know from other projects, so I tried this, but does not work. I get the connection with the database but when I try to save the error with the allready used identifier comes up.

I appreciate your help. I have no experience with the CQRS and the Axon and it seems an interesting technology and I want to use it and see what are the benefits compared to the normal relational databases and I have to use it in this new project and I am at a loss. :frowning: