grails unable to connect to neo4j datastore

試著忘記壹切 提交于 2019-12-25 03:49:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!