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

}
}
erimerturk
  • 4,230
  • 25
  • 25

1 Answers1

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.

Michael Hunger
  • 41,339
  • 3
  • 57
  • 80
  • When i just type to neo4j-shell get this exception. java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused – erimerturk Jan 23 '15 at 14:22