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


queshaw
 

D'oh... So, after that, I get a NullPointerException:


      AnonymousTraversalSource<GraphTraversalSource> ats = traversal(); // not null

      if (new File(props).exists()) // path to conf/remote-graph.properties

          g = ats.withRemote(props);


java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

at org.apache.tinkerpop.gremlin.process.remote.RemoteConnection.from(RemoteConnection.java:73)

at org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource.withRemote(AnonymousTraversalSource.java:76)

at org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource.withRemote(AnonymousTraversalSource.java:66)

at lnf.graph.Queries.go(Queries.java:52)

at lnf.graph.Queries.main(Queries.java:41)

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.apache.tinkerpop.gremlin.process.remote.RemoteConnection.from(RemoteConnection.java:71)

... 4 more

Caused by: java.lang.IllegalStateException: java.lang.NullPointerException

at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection.<init>(DriverRemoteConnection.java:84)

... 9 more

Caused by: java.lang.NullPointerException

at org.apache.tinkerpop.gremlin.driver.Cluster.open(Cluster.java:255)

at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection.<init>(DriverRemoteConnection.java:80)

... 9 more


The server is running and I can connect from gremlin shell.


On Sunday, September 11, 2022 5:03 AM, hadoopmarc@... wrote:

You can take a look at:


Apparently, you used JanusGraphFactory, which opens an embedded JanusGraph instance in the client. If you want to client to connect to a JanusGraph serrver, you use need the g = traversal().withRemote() syntax as shown in the link above.

Best wishes,

Marc


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