我正在尝试连接嵌入式服务器但总是
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();
}
}
答案 0 :(得分:0)
你是如何尝试连接shell的?
只是做:
bin/neo4j-shell
否 -path
参数!!那时你将在同一目录上开始一个新的数据库。