neo4j allow_store_upgrade导致应用程序无法启动

时间:2013-11-09 07:18:29

标签: java spring neo4j

我正在尝试使用neo4j设置一个spring项目。但是,当我运行应用程序时,它不会启动并提供以下异常:

  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'videoRepository': 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' defined in class path resource [spring/neo4j.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.neo4j.kernel.EmbeddedGraphDatabase]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager@147e32a' was successfully initialized, but failed to start. Please see attached cause exception.

  org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnableToUpgradeException: Not all store files match the version required for successful upgrade

这是我的neo4j.xml

<neo4j:repositories base-package="neo4j.repository"/> 
<neo4j:config graphDatabaseService="graphDatabaseService"/>  
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase" destroy-method="shutdown">
    <constructor-arg value="C:/Users/mario/Documents/Neo4j/default.graphdb"/>
    <constructor-arg>
        <map>
            <entry key="allow_store_upgrade" value="true"/>
        </map>
    </constructor-arg>
</bean>

我假设这个问题是由allow_store_upgrade引起的。如果我删除或将此属性设置为false,则抛出异常,建议我将其设置为true。究竟是什么导致了这个问题,我该如何解决?

0 个答案:

没有答案