Spring数据neo4j嵌入式远程shell连接不允许

时间:2015-01-23 12:01:28

标签: neo4j spring-data-neo4j neo4j-embedded

我正在尝试连接嵌入式服务器但总是

Caused by: java.io.IOException: Unable to lock org.neo4j.kernel.impl.nioneo.store.StoreFileChannel@5ceccc52

这是我的配置文件。

@Configuration
@EnableNeo4jRepositories
public class Neo4jConfig extends Neo4jConfiguration {

public static final Setting<Boolean> remote_shell_enabled = Settings.setting("remote_shell_enabled", Settings.BOOLEAN, Settings.TRUE);
public static final Setting<Boolean> enable_remote_shell = Settings.setting("enable_remote_shell", Settings.BOOLEAN, Settings.TRUE);
public Neo4jConfig() {
    setBasePackage("com.repo", "com.model");
}

@Bean
GraphDatabaseService graphDatabaseService() {
    return new GraphDatabaseFactory()
            .newEmbeddedDatabaseBuilder("neo.db2")
            .setConfig(enable_remote_shell, "true")
            .newGraphDatabase();

}
}

1 个答案:

答案 0 :(得分:0)

你是如何尝试连接shell的?

只是做:

bin/neo4j-shell

-path参数!!那时你将在同一目录上开始一个新的数据库。