问题
Getting error when running my grails app that is connecting to Neo4j
Error initializing the application: Error creating bean with name 'neo4jDatastore': FactoryBean threw exception on object creation; nested exception is com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused
Message: Error creating bean with name 'neo4jDatastore': FactoryBean threw exception on object creation; nested exception is com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused
Everything works fine when running embedded mode. However I want to run in rest mode, so I have added the following to Config.groovy:
dependencies {
compile "org.neo4j:neo4j-rest-graphdb:1.6"
}
and to repositories:
mavenRepo 'http://m2.neo4j.org/releases'
In DataSource.groovy
I have added:
grails {
neo4j {
type = "rest"
location = "http://localhost:7474/db/data/"
params = []
}
}
Any idea why the connection was refused?
来源:https://stackoverflow.com/questions/15658727/grails-unable-to-connect-to-neo4j-datastore