0
votes

I have probably a very stupid error here, but I cannot get a simple Grails 4.0.4 project to connect to a Neo4j Desktop instance (1.3.8).

The neo4j service is running and I have been able to verify that I have connectivity to it from other tools, like DBeaver and Python.

The neo4j database settings in application.yml looks like this:

grails:
    neo4j:
        url: bolt://localhost:7687
        username: "neo4j"
        password: "neo4j"

The project I generated from start.grails.org running this:

curl -O start.grails.org/myapp.zip -d version=4.0.4 -d features=events,geb2,neo4j

The problem is when I try to launch a Grails project, the app fails to start with the message:

Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jDatastore': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.datastore.gorm.neo4j.Neo4jDatastore]: Constructor threw exception; nested exception is org.neo4j.driver.v1.exceptions.ServiceUnavailableException: Connection to the database terminated. This can happen due to network instabilities, or due to restarts of the database

Would be grateful for some hints that could help me get started.

Thanks!

1
which version of Neo4j ? I don't think there is support for Neo4j 4.x in Grails yet (I could be wrong)aldrin
You are right. Didn't have time to update my post until now, but after installing the community version 3.5.22 of Neo4j, I was able to make it work. So, as you say, the version of Grails I use doesn't have support for the version included in the Neo4j deskstop I had installed.user215556

1 Answers

1
votes

As per http://gorm.grails.org/snapshot/neo4j/manual/#releaseNotes, there doesn't seem to be a version that yet supports Neo4j 4.x.

The latest supported version is Neo4j 3.x with GORM 7.0.x