0

I am trying to connect embedded server but always getting

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

This is my configuration file.

@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();

}
}
4

1 回答 1

0

How are you trying to connect the shell?

Just do:

bin/neo4j-shell

No -path parameter !! As then you would start a new database on the same directory.

于 2015-01-23T13:19:28.863 回答