cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Querying neo4j graph database with multiple versions

ramikaraki747
Node Link

Dears,

I made a maven project with multiple modules, each module has an implementation to request data from the graph database using a different neo4j java driver.

unfortunately, one java driver is loaded not all of them.

1- the question is how to use different java drivers within the same project, I mean is there a factory version or API that receives the version of the driver?

and what if I upgrade my dependencies to the latest version and I was using a method that has been removed from newer versions.

2- how to handle this without code modifications?
3- Is the driver version related to neo4j desktop version?
thanks

1 REPLY 1

Hello! Unfortunately, there isn't a way to do manage multiple versions of the driver within the same project. There is kind of a workaround where you can separate with modules in Java, but I've been told that is very difficult.

Yes, the driver is typically related to the version of Neo4j itself. However, many of the driver versions are backward-compatible with previous versions of the database. You would need to look up whether the driver version is compatible with your version(s) of Neo4j to verify.

As far as upgrading versions and a method not being used, there should be documentation pointing you to the replacement for a deprecated method, and some of our error messages or deprecation warnings also do that. It shouldn't be too much trouble, but please do let us know if you go that route and have issues!