Neo4J java driver - org.neo4j.driver.v1.exceptions.UntrustedServerException: Server provides no product identifier

Valahu :

I am unable to run any queries on Neo4J after I have updated my neo4j-java-driver from 1.0.5 to 1.7.2.

<dependency>
    <groupId>org.neo4j.driver</groupId>
    <artifactId>neo4j-java-driver</artifactId>
    <version>1.7.2</version>
</dependency>

@Test
public void test2(){
    Driver driver = GraphDatabase.driver("bolt://localhost:7687", AuthTokens.basic("aaa", "bbb"));
    try (Session session = driver.session()) {
      session.run("MATCH (movie:Movie {title:{title}})" +
                                        " OPTIONAL MATCH (movie)<-[r]-(person:Person)\n" +
                                        " RETURN movie.title as title, collect({name:person.name, job:head(split(lower(type(r)),'_')), role:r.roles}) as cast LIMIT 1",
                        map("title", "The Matrix"));
    }
    driver.close();
}

The test above works with 1.0.5 version but fails with the 1.7.2 version with the following error:

org.neo4j.driver.v1.exceptions.UntrustedServerException: Server provides no product identifier

Does anyone know of a sample that works with this new driver version in the vein of the https://github.com/neo4j-examples/neo4j-movies-java-bolt sample for the previous driver?

logisima :

The driver 1.7 is compatible with server version 3.5, 3.4 & 3.3.

So if you use this driver with a server version that is not in the list, you will have the exception UntrustedServerException

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=144513&siteId=1