Connecting neo4j shell to embedded neo4j in java -
[neo4j: 2.1.3, windows 7 64 bit, java 7]
i want able connect embedded neo4j database in java, using neo4j shell. suggested here adding property remote_shell_enabled="true" should that.
i tried suggested shell not able connect db error
caused by: org.neo4j.kernel.storelockexception: unable obtain lock on store lock file: ~\store_lock. please ensure no other process using database, , directory writable (required read-only access)
at org.neo4j.kernel.storelocker.checklock(storelocker.java:82)
i set property follows in code
graphdb = new graphdatabasefactory().newembeddeddatabasebuilder(dbpath).setconfig("remote_shell_enabled","true").newgraphdatabase();
also, doing results in database not shutting down through shutdown hook. instead process not end, seemingly shutdown hook never executed.
if use below start property shutdown hook executed everytime.
graphdb = new graphdatabasefactory().newembeddeddatabase(dbpath);
or
graphdb = new graphdatabasefactory().newembeddeddatabasebuilder(dbpath).newgraphdatabase();
is there other way enable shell access embedded database.
in order open neo4j-shell server @ e.g. port 5000, start database like
new graphdatabasefactory().newembeddeddatabasebuilder(db_dir) .setconfig(shellsettings.remote_shell_enabled, "true") .setconfig(shellsettings.remote_shell_port, "5000") .newgraphdatabase();
and connect using
neo4j-shell -port 5000
does work?
Comments
Post a Comment