Hello,
I am getting the following error when trying to run a command on a Aggregate root:
o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 2289, SQLState: 42000 o.h.engine.jdbc.spi.SqlExceptionHelper : ORA-02289: sequence does not exist o.a.c.gateway.DefaultCommandGateway : Command '...' resulted in org.axonframework.eventsourcing.eventstore.EventStoreException(An event for aggregate [75ef9257c22e45fd90a62067eae9bffb] at sequence [0] could not be persisted)
I am using spring-boot starter, so axon is using Jpa as the event store.
I have been creating the oracle schema using the following code:
private Oracle11EventTableFactory tableFactory = new Oracle11EventTableFactory();
private EventSchema eventSchema = new EventSchema();
public void setupDatabase() throws SQLException {
Connection connection = dataSource.getConnection();
tableFactory.createDomainEventTable(connection, eventSchema);
tableFactory.createSnapshotEventTable(connection, eventSchema);
connection.close();
}
I see that the following is created:
- table DOMAINEVENTENTRY
- oracle sequence DOMAINEVENTENTRY_SEQ
- a trigger DOMAINEVENTENTRY_ID
But once this is created, I am still getting the errors listed above.
I have no idea why Oracle is complaining about the sequence not existing. Can you help me out?