Re: Connecting to server from java: can't lock berkeleyje


queshaw
 

I should probably add I intend to use import static org.janusgraph.core.attribute.Text.* for textContains etc.

On Saturday, September 10, 2022 8:50 AM, queshaw <queshaw@...> wrote:

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.










Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.