Enter code here…
Anyone please help me.See i am very much new to Axon .I have configured my own eventstore and sagastore but i am getting below error
Table “TOKENENTRY” not found; SQL statement:
select tokenentry0_.segment as col_0_0_ from TokenEntry tokenentry0_ where tokenentry0_.processorName=? order by tokenentry0_.segment ASC [42102-199]
2019-10-29 05:39:02.728 WARN 3964 — [[projections]-0] o.a.e.TrackingEventProcessor : Fetch Segments for Processor ‘projections’ failed: org.hibernate.exception.SQLGrammarException: could not prepare statement. Preparing for retry in 8s
2019-10-29 05:39:02.728 WARN 3964 — [agaProcessor]-0] o.a.e.TrackingEventProcessor : Fetch Segments for Processor ‘projections2’ failed: org.hibernate.exception.SQLGrammarException: could not prepare statement. Preparing for retry in 8s
Can anyone provide me a complete Gitrepo link please?
`
@Configuration
public class SagaStoreConfig {
@Bean
@ConfigurationProperties("sagastore.datasource")
public DataSourceProperties dataSourceEsProperties() {
return new DataSourceProperties();
}
private DataSource esDataSource() {
return dataSourceEsProperties().initializeDataSourceBuilder().build();
}
@Bean("sagaEntityManagerFactory")
public LocalContainerEntityManagerFactoryBean sagaEntityManagerFactory(EntityManagerFactoryBuilder builder) {
return builder.dataSource(esDataSource())
.persistenceUnit("saga")
.packages(SagaEntry.class,
AssociationValueEntry.class , TokenEntry.class)
.build();
}
@Bean
@Qualifier("sagaTx")
PlatformTransactionManager platformTransactionManager(@Qualifier("sagaEntityManagerFactory") LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean){
return new JpaTransactionManager(localContainerEntityManagerFactoryBean.getObject());
}
@Bean("tokenStore")
public TokenStore jpaTokenStore(@Qualifier("eventSerializer") Serializer eventSerializer , @Qualifier("sagaEntityManagerFactory")LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean) {
return JpaTokenStore.builder()
.entityManagerProvider(new SimpleEntityManagerProvider(localContainerEntityManagerFactoryBean.getObject().createEntityManager()))
.serializer(eventSerializer)
.build();
}
@Bean("sagaStore")
public JpaSagaStore jpaSagaStore(@Qualifier("eventSerializer") Serializer eventSerializer, @Qualifier("sagaEntityManagerFactory")LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean){
return JpaSagaStore.builder()
.entityManagerProvider(new SimpleEntityManagerProvider(
localContainerEntityManagerFactoryBean.getObject().createEntityManager()))
.serializer(eventSerializer)
.build();
}
}