Don't know how to return count-value in Java
Basic question, why does
next()
not seem to give me the results back about the count of Entities?
31 Replies
That error has less to do with your Gremlin and more to do with your connection to Gremlin Server. If you're using 3.5.5/3.6.2 or better on either release line, the
Client
object you've initialized can't initialize the connection pool because it can't even get to the host for some reason. older versions prior to those will have a more nuanced reason for NoHostAvailableException
but it would again have something to do with the connection and less to do with the Gremlin being sent. you can read a bit more about this here: https://tinkerpop.apache.org/docs/current/upgrade/#_gremlin_driver_host_availability with some additional reading here about timeout troubleshooting which may have some relevance: https://tinkerpop.apache.org/docs/current/reference/#gremlin-java-troubleshootingI don't know how to tell, I'm just using the latest ArcadeDB
arcadedb-23.4.1
You don't know how to tell what?
Which version of Gremlin was added to the bundle
either way, i'm pretty sure that you have a connection problem and not a Gremlin problem there. that said, i'm not sure why you don't know what version of TinkerPop you are using though. you have have had to choose a version when you setup your java project or downloaded Gremlin Console or whatever, right?
The Gremlin Console and Server came pre-bundled with it
so what is that log from? those are ArcadeDB server logs?
They're from the response back to Java
so from your application written in Java, right?
so what version of TinkerPop did you choose to write your application?
that's the driver version i'm referring to in my original reply
I don't know, I'm already way past wit's end here.
https://github.com/ArcadeData/arcadedb/releases/tag/23.4.1
GitHub
Release 23.4.1 · ArcadeData/arcadedb
What's New
SQL
Add bool_and and bool_or functions by @gramian in #1017
Add base64url format to encode and decode functions by @gramian in #1019
Add ifnull method by @gramian in #1030
Add ILI...
I don't see the TinkerPop version listed in the release notes
your java application wouldnt run to even get an error (wouldn't even compile for that matter) if you didn't have a TinkerPop gremlin-driver jar file somehow referenced to the application itself. how are you referencing that jar?
ok, so you are transitively getting the gremlin-driver dependency through arcade db.
Yeah
when you have this situation you can either dig around in the project's pom.xml which is easy when it's an open source project:
GitHub
arcadedb/pom.xml at 23.4.1 · ArcadeData/arcadedb
ArcadeDB Multi-Model Database, one DBMS that supports SQL, Cypher, Gremlin, HTTP/JSON, MongoDB and Redis. ArcadeDB is a conceptual fork of OrientDB, the first Multi-Model DBMS. - arcadedb/pom.xml a...
or you can do a
mvn dependency:tree
in your project and it should tell you
or you can go in your build directory for your application, presumably, target/
and find the jars
in any event, ti's 3.6.2So it's new enough
Is there a known fix for this?
Did I make a mistake on some gremlin configuration I need to perform?
Is there an additional adjustments I should be looking out for? (In the documents or in the code)
you're on one of the newer versions i mentioned so the problem is:
Client object you've initialized can't initialize the connection pool because it can't even get to the host for some reasonyou need to figure out the reason for the connection pool initialization failure. i sort of would expect other error messages in the logs but you didn't present any. what have you tried? you said console was bundled with ArcadeDB...did you try to connect with that? does it work? or maybe try sending scripts to ArcadeDB as that gets you a bit closer to the metal to see the initialization failure for the
Client
?"Connection refused: no further information" is almost like the server isn't even running
Do you know what the
graph
value is supposed to be set to with ArcadeDB?
I have been asking ArcadeDB as well, and I'm getting silence right now
I haven't even been able to get their document example to work Expected 1 arguments but found 5
.
not sure. i don't know anything about ArcadeDB. i still think there is some basic networking issue at play here. "connection refused" is fairly direct way of the driver saying, "i can't reach the server at that host and port"
how did you start arcadedb?
Ran
server.bat
It seems to be working fine for creating vertices and their "Types" / Classes.And g seems to exist for localhost:8182
the connection pool doesn't initialize until you send a request iirc, so while "g" i setup with localhost:8182 it really doesn't mean much until you send a request and you don't do that until you hit the line your debugger is at
what's in
config/gremlin-server.yaml
? basically this file?
https://github.com/ArcadeData/arcadedb/blob/main/package/src/main/config/gremlin-server.yaml
host is 0.0.0.0
in that and not localhost
. i wonder if something is not binding right there with your driver trying to connect with the latter
maybe play with that for a bit?Yeah, I'll try that
Same issue regardless of
localhost
8182
added and server.bat
restarted