无法移动到Neo4j 2.2.0和Spring Data Neo4j 3.3.0.RELEASE

ale*_*oid 6 neo4j spring-data-neo4j spring-boot

我使用Spring 4.1.6.RELEASE和Spring Boot 1.2.3.RELEASE.现在,我无法顺利地从Neo4j 2.1.7和SDN 3.2.2.RELEASE迁移到Neo4j 2.2.0和SDN 3.3.0.RELEASE

首先,Neo4jHelper课程缺席......那么应该使用什么呢?

此外,我的测试崩溃,但有以下例外:

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)
Run Code Online (Sandbox Code Playgroud)

但在以前的版本中一切正常(我的DAO和服务都注释了@Transactional).

如何在我的Spring Boot应用程序中为Neo4j配置适当的TX管理器?

现在NullTransactionManager使用,我认为这是问题的原因:

2015-04-03 11:40:36 [main] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.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  o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2015-04-03 11:40:38 [main] INFO  o.s.t.jta.JtaTransactionManager - Using JTA UserTransaction: org.springframework.transaction.jta.UserTransactionAdapter@5909b7c2
2015-04-03 11:40:38 [main] INFO  o.s.t.jta.JtaTransactionManager - Using JTA TransactionManager: org.springframework.data.neo4j.config.NullTransactionManager@16bc4d92
Run Code Online (Sandbox Code Playgroud)

我做错了什么?

Mic*_*ger 5

这是正在进行的工作,我在分支机构中有它,但由于Neo4j 2.2改变了许多内部API,所以还没有完成.

请继续关注下周左右.

  • 什么是保持警报/找出Spring Data/Spring Data Neo4j和Neo4j之间互操作性的最新状态的最佳方法?是否有规范的"状态"页面显示最近的工作组合? (6认同)
  • 对此有何评论? (2认同)
  • 一个月前提交了这个JIRA问题,但到目前为止还没有回应.我猜这可能是团队有时间做这件事时听到更新的最佳地点.期待Neo4j 2.2的性能提升!https://jira.spring.io/browse/DATAGRAPH-593 (2认同)