JpaEventStore not creating events table

Goal: JPA event store, storing events in a jpa supported db
Using spring boot with axon-spring-boot-starter

So it is my understanding that when the axon server is either disabled via settings or when the axon-server-connector dependency is excluded that axon falls back to other standards{1}. In the order of
Custom; JPA; JDBC; InMemory{2}
It is also my understanding that when no custom config is given, that the spring boot autoconfigure will configure a basic form of handling the event store{2} and that when for example @entityScan etc are not used, that axon automatically registers the needed JPA repositories{1}

So from my understanding, all that I have to do, to get a basic running jpa event store, is to exclude the axon-server-connector dependency and that axon automatically handles the rest.

My problem is that only the databases for projected models are created, as well as a saga_entry and token_entry table. But no DomainEvent related table.

Can any one help me, or point me in the direction of what I am missing.

{1}: Spring Boot Integration - Axon Reference Guide
{2} Event Bus & Event Store - Axon Reference Guide

It seems that the automatic EntityScan like described in link number 1. Might not be working as intended.

When i add the following in spring boot;
@EntityScan(basePackages = {
“org.axonframework.eventsourcing.eventstore.jpa”,
“org.axonframework.eventhandling.tokenstore.jpa”,
“org.axonframework.modelling.saga.repository.jpa”,
“our.own.application.context”
})

Then it does work. It seems as if only;
“org.axonframework.eventhandling.tokenstore.jpa”,
“org.axonframework.modelling.saga.repository.jpa”

are registered automatically

HOWEVER: Events are not stored in the table

After many hours of searching we have found the problem. A colleague put an InMememoryEventStore bean in the project causing changes to the default behavior. After removing it everything worked as expected.

Thank you and with kind regards

1 Like

Hi @redlum7, I am glad you figured it out by yourself.

Let us know if you have more doubts.

KR,