Neo4j、蓝图和 UpgradeNotAllowedByConfigurationException

Neo4j, Blueprint and UpgradeNotAllowedByConfigurationException

我正将脚趾浸入 Neo4j 水中,运行 出现以下错误:

Caused by: org.neo4j.kernel.impl.storemigration.UpgradeNotAllowedByConfigurationException: Failed to start Neo4j with an older data store version. To enable automatic upgrade, please set configuration parameter "allow_store_upgrade=true"
    at org.neo4j.kernel.impl.storemigration.ConfigMapUpgradeConfiguration.checkConfigurationAllowsAutomaticUpgrade(ConfigMapUpgradeConfiguration.java:39)
    at org.neo4j.kernel.impl.storemigration.StoreUpgrader.attemptUpgrade(StoreUpgrader.java:71)
    at org.neo4j.kernel.impl.nioneo.store.StoreFactory.tryToUpgradeStores(StoreFactory.java:144)
    at org.neo4j.kernel.impl.nioneo.store.StoreFactory.newNeoStore(StoreFactory.java:119)
    at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.start(NeoStoreXaDataSource.java:323)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:503)
    ... 37 more

但是,我修改了 neo4j.properties 以包括:

Enable this to be able to upgrade a store from an older version

allow_store_upgrade=true

我正在使用蓝图和蓝图-emf。这是我的代码:

@ApplicationScoped
public class EmfPersistance {

    public void testCall() throws IOException{      

        EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
        EPackage.Registry.INSTANCE.put(DomainPackage.eNS_URI, DomainPackage.eINSTANCE);        


        Neo4j2Graph graph = new Neo4j2Graph("/home/anton/Documents/software/neo4j/neo4j-community-2.1.7/data/graph.db");

        ResourceSet resourceSet = new ResourceSetImpl();
        resourceSet
            .getResourceFactoryRegistry()
            .getExtensionToFactoryMap()
            .put("*", new BlueprintsResourceFactory(graph));

        resourceSet
            .getURIConverter()
            .getURIHandlers()
            .add(0, new GraphHandler());


        Application app = DomainFactory.eINSTANCE.createApplication();
        app.setIdentifier("hello");
        User user = DomainFactory.eINSTANCE.createUser();
        user.setActualName("user");
        user.setUsername("user");
        user.setEmailAddress("email@gmail.com");



        Resource resource = resourceSet.createResource(URI.createURI("graph:/my/graph/users"));
        resource.getContents().add(user);
        resource.save(null);

        graph.shutdown();
    }

}

我遇到了同样的问题。我添加了以下依赖项以及 blueprints 依赖项,并且我能够将测试设为 运行.

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j</artifactId>
    <version>2.1.7</version>
</dependency>