Spring数据Neo4j从2.3.3迁移到3.0.0 RC1时出现问题
我正在尝试将SDN项目从当前的稳定版本(2.3.3)迁移到支持Neo4j 2.0的3.0.0 RC1版本。 该项目是一个WAR,部署在Glassfish 3.1.2.2服务器上,使用EJB,通过@AutowiredSpring数据Neo4j从2.3.3迁移到3.0.0 RC1时出现问题,neo4j,spring-data-neo4j,Neo4j,Spring Data Neo4j,我正在尝试将SDN项目从当前的稳定版本(2.3.3)迁移到支持Neo4j 2.0的3.0.0 RC1版本。 该项目是一个WAR,部署在Glassfish 3.1.2.2服务器上,使用EJB,通过@Autowiredneo4joOperations对象和GraphRespository对象访问Neo4j。 使用SpringBeanAutowiringInterceptorinterceptor注释支持自动布线。 spring xml配置文件中的以下行给出了SDN配置: 使用2.3.3 SDN版
neo4joOperations
对象和GraphRespository
对象访问Neo4j。
使用SpringBeanAutowiringInterceptor
interceptor注释支持自动布线。
spring xml配置文件中的以下行给出了SDN配置:
使用2.3.3 SDN版本时一切正常,但不幸的是,使用3.0.0 RC1在部署时会出现以下错误:
javax.enterprise.inject.unsatifiedResolutionException:无法
解决一个问题
'org.springframework.data.neo4j.support.mapping.Neo4jMappingContext'
使用限定符[@javax.enterprise.inject.Any(),
@javax.enterprise.inject.Default()]。
位于org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.createRepositoryBean(Neo4jCdiRepositoryExtension.java:107)
位于org.springframework.data.neo4j.repository.cdi.Neo4jCdiRepositoryExtension.afterBeanDiscovery(Neo4jCdiRepositoryExtension.java:82)
我真的不知道我的项目出了什么问题,我会感谢任何能帮助我解决这个问题的人
更新:与3.0.0.版本的问题相同。不再有
嵌入式图形数据库的构造函数
您必须使用我添加的GraphDatabaseServiceFactoryBean
<bean id="graphDatabaseService" class="org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean"
destroy-method="shutdown" scope="singleton">
<constructor-arg value="target/config-test"/>
<constructor-arg>
<map>
<entry key="allow_store_upgrade" value="true"/>
</map>
</constructor-arg>
</bean>
谢谢@Michael,我刚刚试过,不幸的是,我仍然得到完全相同的错误。我的印象是,在我的配置中,SDN期望使用JavaEECDI将graphDatabaseService bean注入到某个地方。有解决方案吗?我也遇到了同样的问题,如果我引入一个扩展了“GraphRespository”的存储库,@MarcusSchultö它在当前的3.2.0版本中得到了解决。
<bean id="graphDatabaseService" class="org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean"
destroy-method="shutdown" scope="singleton">
<constructor-arg value="target/config-test"/>
<constructor-arg>
<map>
<entry key="allow_store_upgrade" value="true"/>
</map>
</constructor-arg>
</bean>