I am using Spring 4.1.6.RELEASE and Spring Download 1.2.3.RELEASE. Right now I canβt smoothly switch from Neo4j 2.1.7 and SDN 3.2.2.RELEASE to Neo4j 2.2.0 and SDN 3.3.0.RELEASE
First of all, the Neo4jHelper class Neo4jHelper missing ... so what should be used instead?
In addition, my tests fail with the following exceptions:
org.springframework.dao.InvalidDataAccessApiUsageException: nested exception is org.neo4j.graphdb.NotInTransactionException at org.springframework.data.neo4j.support.Neo4jExceptionTranslator.translateExceptionIfPossible(Neo4jExceptionTranslator.java:51) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
but in previous versions everything works fine (My DAO and Services are annotated using @Transactional ).
How to configure the appropriate TX manager for Neo4j in my Spring boot application?
NullTransactionManager is currently in use, and I think this is causing the problem:
2015-04-03 11:40:36 [main] INFO oscaAnnotationConfigApplicationContext - Refreshing org.spring framework.context.annotation.AnnotationConfigApplicationContext@ 12db5286: startup date [Fri Apr 03 11:40:36 EEST 2015]; root of context hierarchy 2015-04-03 11:40:37 [main] INFO osbfaAutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 2015-04-03 11:40:38 [main] INFO ostjta.JtaTransactionManager - Using JTA UserTransaction: org.springframework.transaction.jta.UserTransactionAdapter@5909b 7c2 2015-04-03 11:40:38 [main] INFO ostjta.JtaTransactionManager - Using JTA TransactionManager: org.springframework.data.neo4j.config.NullTransactionManager@16b c4d92
what am I doing wrong?
source share