Relation "token_entry" does not exist

I want to use Axon Framework and Axon Server as my event store and event bus along side with spring boot project that include spring data jpa with postgres as my db.

I’m using Axon 4.5 and spring boot 2.5.4 with Java 16.

I need spring data JPA for other things and not for Axon. I want Axon server as my event store and event bus. I use docker to start axon server but when I try to start my spring boot app I get

org.postgresql.util.PSQLException: ERROR: relation “token_entry” does not exist

As far as I know I don’t need to do anything since Axon autoconfigure Axon serve to be event store even if use jpa in my app

so why I get token_entry does not exist exception?

There are three tables which are required for an Axon app even if you are using Axon Server and event sourcing.

  • association_value_entry - persist the associations values (for sagas).
  • saga_entry - serialised sagas.
  • token_entry - tracking tokens for the application tracking event processors.

You can have Hibernate create them for you by setting the property: spring.jpa.hibernate.ddl-auto=update or run the SQL so that the tables exist in the DB (see here).

Also see this page.

1 Like

I see. Thank you very much. But is still means that I use Axon Server as my event store right?

Yes it should mean that.

Good luck.