Issues with tracking token

Hi,

I am using Axon framework 4.2.1 with springboot 2.2.2, I am using JPAEventStorageEngine and using oracle database and I have created all event sourcing tables.Getting the below mentioned error when I bring up my springobot application.

Even though I have truncated my tokenentry table when I run my app it populates the table with some entries, not sure where these entries are coming from.

javax.persistence.TransactionRequiredException: no transaction is in progress
at org.hibernate.internal.AbstractSharedSessionContract.checkTransactionNeededForUpdateOperation(AbstractSharedSessionContract.java:409) ~[hibernate-core-5.4.9.Final.jar:5.4.9.Final]
at org.hibernate.internal.SessionImpl.checkTransactionNeededForUpdateOperation(SessionImpl.java:3393) ~[hibernate-core-5.4.9.Final.jar:5.4.9.Final]
at org.hibernate.internal.SessionImpl.find(SessionImpl.java:3320) ~[hibernate-core-5.4.9.Final.jar:5.4.9.Final]
at org.hibernate.internal.SessionImpl.find(SessionImpl.java:3303) ~[hibernate-core-5.4.9.Final.jar:5.4.9.Final]
at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:368) ~[spring-orm-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at com.sun.proxy.$Proxy108.find(Unknown Source) ~[na:na]
at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:314) ~[spring-orm-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at com.sun.proxy.$Proxy108.find(Unknown Source) ~[na:na]
at org.axonframework.eventhandling.tokenstore.jpa.JpaTokenStore.loadToken(JpaTokenStore.java:216) ~[axon-messaging-4.2.1.jar:4.2.1]
at org.axonframework.eventhandling.tokenstore.jpa.JpaTokenStore.fetchToken(JpaTokenStore.java:167) ~[axon-messaging-4.2.1.jar:4.2.1]
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.lambda$run$1(TrackingEventProcessor.java:1135) ~[axon-messaging-4.2.1.jar:4.2.1]
at org.axonframework.common.transaction.TransactionManager.executeInTransaction(TransactionManager.java:47) ~[axon-messaging-4.2.1.jar:4.2.1]
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.run(TrackingEventProcessor.java:1134) ~[axon-messaging-4.2.1.jar:4.2.1]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_251]

can someone help

forgot to paste the last line of the error
2020-08-19 18:56:34.117 INFO 8292 — [ing.producer]-0] o.a.e.TrackingEventProcessor : An error occurred while attempting to claim a token for segment: 0. Will retry later…

Looks like there is a transaction manager missing.
Did you configure any components “manually”? Or do you let Spring Boot Autoconfiguration create everything?

Lastly, please note that the latest release is Axon 4.4.2. It might be worthwhile using that.

Thanks Allard. I managed to resolve the issue. It was related to datasource configuration. I was using two different databases one for my application and other for event store. Making the datasource configuration for event store as @Primary resolved the issue.