Hello,
I’m trying Axon for the first time and have a rough time with my very basic Axon app (Spring Boot). I have no configuration for Axon.
Controller:
@PostMapping
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void create(@RequestBody @Valid CreateTaskRequest request) {
UUID id = UUID.randomUUID();
commandGateway.send(new CreateTaskCommand(id, request.getTitle()));
}
This is my aggregate that acts as a command handler and events sourcing handler:
`
@Aggregate
public class Task {
private static final long serialVersionUID = -5977984483620451665L;
private static Logger LOGGER = LogManager.getLogger(ApiController.class);
@AggregateIdentifier
private UUID id;
@CommandHandler
public Task(CreateTaskCommand command) {
apply(new TaskCreatedEvent(command.getId(), command.getTitle(), command.getCreatedAt()));
}
@EventSourcingHandler
void on(TaskCreatedEvent event) {
this.id = event.getId();
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
`
And I get this exception:
21:51:22.591 [http-nio-8080-exec-1] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 42P01 21:51:22.591 [http-nio-8080-exec-1] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ERROR: relation "hibernate_sequence" does not exist Pozice: 17 21:51:22.597 [http-nio-8080-exec-1] WARN org.axonframework.commandhandling.gateway.DefaultCommandGateway - Command 'sandbox.CreateTaskCommand' resulted in org.axonframework.eventsourcing.eventstore.EventStoreException(An event for aggregate [a335b9ca-fe8d-49e0-aa90-4fa76ddbb450] at sequence [0] could not be persisted)
Even I don’t try to persist any entity / aggregate manually - why is Axon trying to get some sequence value and why and where is trying to persist?
What did I do wrong?