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)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 have this issue when using Jpa (default spring boot configuration) for the EventStore (the Autoconfigured JpaTransactionManager, the Jpa StorageEngine etc).When I configure the Axon evenstore with plain Jdbc (JdbcStorageEngine, DataSourceTransaction manager etc), I do not have issues with Oracle (same table structure). But as we will probably be using Jpa for the query model, I would like to use it as well for the EventStore.
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@EntityScan({"ourpackage.with.entities","org.axonframework.eventsourcing.eventstore.jpa","org.axonframework.eventhandling.saga.repository.jpa"})
2018-03-26 10:42:03.547 DEBUG 8100 --- [nio-8090-exec-8] org.hibernate.SQL : select our_schema.hibernate_sequence.nextval from dual
2018-03-26 10:42:03.547 TRACE 8100 --- [nio-8090-exec-8] o.h.r.j.i.ResourceRegistryStandardImpl : Registering statement [oracle.jdbc.driver.OraclePreparedStatementWrapper@78d8a458]
2018-03-26 10:42:03.554 DEBUG 8100 --- [nio-8090-exec-8] o.h.engine.jdbc.spi.SqlExceptionHelper : could not extract ResultSet [n/a]
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="2.0">
<mapped-superclass class="org.axonframework.eventsourcing.eventstore.AbstractSequencedDomainEventEntry" access="FIELD">
<attributes>
<id name="globalIndex">
<generated-value generator="domainEventGenerator" strategy="SEQUENCE"/>
</id>
</attributes>
</mapped-superclass>
<entity class="org.axonframework.eventsourcing.eventstore.jpa.DomainEventEntry" access="FIELD">
<sequence-generator name="domainEventGenerator" sequence-name="domain_event_seq" allocation-size="1"/>
</entity>
</entity-mappings>
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
spring.jpa.hibernate.ddl-auto: create-drop<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="2.0">
<mapped-superclass class="org.axonframework.eventsourcing.eventstore.AbstractSequencedDomainEventEntry" access="FIELD">
<attributes>
<id name="globalIndex">
<generated-value generator="domainEventGenerator" strategy="SEQUENCE"/>
</id>
</attributes>
</mapped-superclass>
<entity class="org.axonframework.eventsourcing.eventstore.jpa.DomainEventEntry" access="FIELD">
<sequence-generator name="domainEventGenerator" sequence-name="DOMAIN_EVENT_ENTRY_SEQ" allocation-size="1"/>
</entity>
<entity class="org.axonframework.eventhandling.saga.repository.jpa.AssociationValueEntry" access="FIELD">
<sequence-generator name="associationValueEntryGenerator"
sequence-name="ASSOCIATION_VALUE_ENTRY_SEQ"
allocation-size="1" />
<attributes>
<id name="id">
<generated-value generator="associationValueEntryGenerator" strategy="SEQUENCE" />
</id>
</attributes>
</entity>
</entity-mappings>