JanusGraph interface using Java
I am planning to use JanusGraph in my spring boot Java web application, in my windows dev box , running JanusGraph in a docker container, and running my Java outside of , unable to successfully establish a connection with JanusGraph. Can anyone please provide details on which dependencies to be used and the API to use , and any example with sample
12 Replies
You just need
I have a personal project that uses JanusGraph server + Spring Boot that you might want to reference: https://github.com/li-boxuan/citegraph
GitHub
GitHub - li-boxuan/citegraph: CiteGraph: A citation graph web visua...
CiteGraph: A citation graph web visualizer. Contribute to li-boxuan/citegraph development by creating an account on GitHub.
@boxuanli thanks , I am now getting java.net.ConnectException : connection refused : no further information.
Where are you getting that error?
@boxuanli Basically it is working good in the Linux machine. Thanks to your sample project. Issue in the Windows , where i am running Janusgraph in the docker and web app outside. seems like my client program request to the Janusgraph is rejected.
While now i continue my development in the Linux , i am getting io.netty.handler.codec.DecoderException while adding an edge. io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(162) + length(615279) exceeds writerIndex(210): CompositeByteBuf(ridx: 162, widx: 210, cap: 210, components=1). Any insight will be helpful.
@boxuanli Basically it is working good in the Linux machine. Thanks to your sample project. Issue in the Windows , where i am running Janusgraph in the docker and web app outside. seems like my client program request to the Janusgraph is rejected.
Could it be possible that you use one JanusGraph version/config setting to create the graph, but a different JanusGraph version/config setting to read the graph?
Nope it is same
What's the JanusGraph server and client version you are using?
Can you also provide all of your config files please
Using server version --> janusgraph-0.6.3 , pom.xml --> <janusgraph.version>1.0.0-20230428-082704.5159135</janusgraph.version> , gremline -- > 3.6.2
Why do you need
janusgraph.version
in your pom.xml
?
Although not sure why you include janusgraph dependency in your maven project, it is clearly a different version than your server version.Basically I am using JanusGraphIoRegistry which is available in janusgraph-core artifact , any other alternative ? Thank you, version issue is resolved.
Basically I am using JanusGraphIoRegistry which is available in janusgraph-core artifactOh yeah I see.
janusgraph-driver
should be enough for your purpose, but it doesn't harm to include janusgraph-core
.
Back to your problem. You say the setup works on Linux but not on Windows. What exactly does it mean? When you run both client and server on Linux, it works, but not when you run both on Windows? OR you are running the server on Linux, and the client on Windows?