当前位置: 首页 > 知识库问答 >
问题:

我更新不了Spring数据neo4j版本

万俟超
2023-03-14

当我试图更新我的项目JAR以与新版本的neo4j服务器兼容时,我正在使用neo4j 2.1.2服务器我遇到了问题。

这是porm.xml中使用的旧版本配置

 <properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <spring.core.version>3.2.1.RELEASE</spring.core.version>
    <spring.data.neo4j.version>2.1.0.M1</spring.data.neo4j.version>

    <neo4j.kernel.version>1.6</neo4j.kernel.version>
    <neo4j.cypher.version>1.6</neo4j.cypher.version>
    <neo4j.cypher.dsl.version>1.6</neo4j.cypher.dsl.version>

    <hibernate.validator.version>4.1.0.Final</hibernate.validator.version>
    <scala.library.version>2.9.0-1</scala.library.version>

    <cglib.version>2.2</cglib.version>
    <aspectj.version>1.6.10</aspectj.version>

    <slf4j.version>1.6.1</slf4j.version>
    <log4j.version>1.2.14</log4j.version>

    <javax.servlet-api.version>2.5</javax.servlet-api.version>
    <javax.jstl-taglibs.version>1.1.2</javax.jstl-taglibs.version>
    <jackson.version>1.9.3</jackson.version>

    <spring.social.core.version>1.1.0.RELEASE</spring.social.core.version>
    <spring.social.web.version>1.1.0.RELEASE</spring.social.web.version>
    <spring.social.facebook.version>1.1.1.RELEASE</spring.social.facebook.version>

    <spring.security.core.version>3.2.4.RELEASE</spring.security.core.version>

    <!-- Testing -->
    <mockito.version>1.8.5</mockito.version>
    <junit.version>4.8.2</junit.version>

    <!-- Plugins -->
    <maven.compiler.plugin.version>2.3.2</maven.compiler.plugin.version>
    <maven.apt.plugin.version>1.0</maven.apt.plugin.version>
  </properties>

这是新的:

<properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <spring.core.version>3.2.5.RELEASE</spring.core.version>
    <spring.data.neo4j.version>3.1.0.RELEASE</spring.data.neo4j.version>

    <neo4j.kernel.version>2.1.2</neo4j.kernel.version>
    <neo4j.cypher.version>2.1.2</neo4j.cypher.version>
    <neo4j.cypher.dsl.version>1.6</neo4j.cypher.dsl.version>

    <hibernate.validator.version>4.1.0.Final</hibernate.validator.version>
    <scala.library.version>2.9.0-1</scala.library.version>

    <cglib.version>2.2</cglib.version>
    <aspectj.version>1.6.10</aspectj.version>

    <slf4j.version>1.6.1</slf4j.version>
    <log4j.version>1.2.14</log4j.version>

    <javax.servlet-api.version>2.5</javax.servlet-api.version>
    <javax.jstl-taglibs.version>1.1.2</javax.jstl-taglibs.version>
    <jackson.version>1.9.3</jackson.version>

    <spring.social.core.version>1.1.0.RELEASE</spring.social.core.version>
    <spring.social.web.version>1.1.0.RELEASE</spring.social.web.version>
    <spring.social.facebook.version>1.1.1.RELEASE</spring.social.facebook.version>

    <spring.security.core.version>3.2.4.RELEASE</spring.security.core.version>

    <!-- Testing -->
    <mockito.version>1.8.5</mockito.version>
    <junit.version>4.8.2</junit.version>

    <!-- Plugins -->
    <maven.compiler.plugin.version>2.3.2</maven.compiler.plugin.version>
    <maven.apt.plugin.version>1.0</maven.apt.plugin.version>
  </properties>

但是当我试图编译我的应用程序时,我得到了这样的跟踪跟踪:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'offerRepository': Cannot resolve reference to bean 'neo4jTemplate' while setting bean property 'neo4jTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.data.neo4j.config.Neo4jConfiguration#0': Cannot resolve reference to bean 'graphDatabaseService' while setting bean property 'graphDatabaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphDatabaseService': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\String\sts-3.5.1.RELEASE\target\mydata
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1417)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.data.neo4j.config.Neo4jConfiguration#0': Cannot resolve reference to bean 'graphDatabaseService' while setting bean property 'graphDatabaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphDatabaseService': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\String\sts-3.5.1.RELEASE\target\mydata
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1417)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1055)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
    ... 29 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphDatabaseService': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\String\sts-3.5.1.RELEASE\target\mydata
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1468)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:307)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
    ... 48 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\String\sts-3.5.1.RELEASE\target\mydata
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:358)
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:90)
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:199)
    at org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean.createDatabase(GraphDatabaseServiceFactoryBean.java:50)
    at org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean.getObject(GraphDatabaseServiceFactoryBean.java:42)
    at org.springframework.data.neo4j.support.GraphDatabaseServiceFactoryBean.getObject(GraphDatabaseServiceFactoryBean.java:14)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    ... 53 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager@23e3e52f' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:335)
    ... 60 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource@36170f27' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
    at org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:164)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507)
    ... 62 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: 'neostore.nodestore.db' has a store version number that we cannot upgrade from. Expected 'NodeStore v0.A.1' but file is version 'NodeStore v0.A.0'.
    at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:69)
    at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:100)
    at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:234)
    at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:129)
    at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.start(NeoStoreXaDataSource.java:350)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507)
    ... 65 more

共有1个答案

水浩歌
2023-03-14

试试这个,也许会有帮助

进入数据库并打开neo4j。属性将此行放入:allow_store_pgrade=true

 类似资料:
  • 我有与Spring data neo4j一起工作的Spring服务,我决定将Spring data neo4j从2.2更新到当前版本-3.1.4。释放。所以第一次我更新了neo4j,项目失败了,我更新了Spring版本,不同的版本有不同的例外。这个服务包括在我的前端,我叫它是从网络。所以我不知道什么是最佳配置???配置与maven。这里有pom.xml Spring配置文件 所以每次加载db例外,

  • 我有一个Spring应用程序,其中Domain Object标识符不是由数据库分配的,而是由应用程序生成的。标识符是在BeforeSave回调期间生成并添加到Domain Object中的。保存域对象(插入)后,当尝试保存具有相同标识符的域对象(更新)时,我收到以下错误 原因:组织。springframework。道。Incorrectupdatesemanticdataaccessexcepti

  • 关于最新的和我的测试失败了以下NPE(几天前一切正常,我的代码没有一行没有被更改): 我的代码: 这个问题的原因是什么?如何解决它?

  • 编辑:我已经用一个带有PropertyValueFactory的cellValueFactory创建了和TableView,但是当我更新表示TableView数据的ObservableList时,我的TableView将不会更新。我确信readNctsvorgaenge()创建的新列表已经更新,并且包含了附加项。这是用mvvmfx->moodel view viewmodel实现的 这是FXML文

  • Neo4j 2.0。0已发布。所以我更新了neo4j版本2.0。0.M6到2.0。0.0发布。并尝试在我的网站中更新模型,但出现异常。 组织。springframework。刀。DataIntegrityViolationException:唯一属性类java。lang.String rankStatId rel:false idx:true被设置为重复值3073631_99 MY SDN版本是2

  • 包org.springframework.data.neo4j.annotation中的注释@Query提供了某些计数属性,如CountQuery、CountQueryName。 有人能解释一下这些的用法吗?更具体地说,我写了一个查询来获取关于一个主题的帖子。查询结果将被分页。下面的查询工作正常,并给我的结果。 现在我还需要结果的总数,我是否必须为此编写另一个查询,或者是否有一种方法可以容纳计数查