I'm trying to connect to janusgraph server from java. If I follow the instructions in the documentation, using this in gradle:
implementation 'org.janusgraph:janusgraph-driver:0.6.2'
implementation 'org.apache.tinkerpop:gremlin-driver:3.5.3'
JanusGraph and JanusGraphFactory can't be found. If I add:
implementation 'org.janusgraph:janusgraph-core:0.6.2'
and I use conf/remote-graph.properties, I get an error message that root.storage.backend needs to be defined. I don't find that property, but if I add:
storage.backend=berkeleyje
then I get Could not find implementation class: org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager
If I add:
implementation 'org.janusgraph:janusgraph-berkeleyje:0.6.2'
then I get:
Please supply configuration parameter "storage.directory" or both "storage.root" and "graph.graphname".
If I add:
storage.directory=/somewhere/graph/berkeleyje
then I get:
/somewhere/graph/berkeleyje The environment cannot be locked for single writer access. ENV_LOCKED: The je.lck file could not be locked. Environment is invalid and must be closed.
I think that is because the server is running and the file is locked.
How can I connect to a running server remotely from java, if I'm using berkeleyje? I've been able to connect to the server to run queries from python and from gremlin shell.
Thanks.