1

我刚刚开始为我正在构建的一个新的社交网站使用 Neo4j 图形数据库。在我想使用空间插件以便能够以有效的方式提出“让所有用户在距离 X 点 2 公里范围内”之类的问题之前,一切都运行得非常好并且符合预期。

我正在为 windows 和 neo4j-spatial-0.12 服务器插件使用 neo4j-community-2.0.0 二进制文件。

通过 REST-API 询问 :GET /db/data 给了我:

"extensions": {
    "SpatialPlugin": {
      "addNodeToLayer": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer",
      "findGeometriesWithinDistance": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesWithinDistance",
      "findGeometriesInBBox": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesInBBox",
      "addSimplePointLayer": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer",
      "getLayer": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/getLayer",
      "addGeometryWKTToLayer": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer",
      "addCQLDynamicLayer": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addCQLDynamicLayer",
      "addEditableLayer": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addEditableLayer",
      "updateGeometryFromWKT": "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/updateGeometryFromWKT"
    }
  },

...但是当我尝试添加一个简单的点层时:

:POST http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
{
  "layer" : "geom",
  "lat" : "lat",
  "lon" : "lon"
}

服务器以 500 响应 :( 任何人都知道出了什么问题/我可以从哪里获得有关该问题的更多信息?

4

1 回答 1

0

The plugin still references a version of the GraphDatabaseService interface that introduced a breaking change in a recent Neo4J version.

The 500 you're seeing is because of a NoSuchMethodError, where GraphDatabaseService.getReferenceNode() is being called. That method no longer exists in the Neo4J v2.0.0 API.

I've added a defect on GitHub for this to be fixed, documented here

于 2014-01-07T00:01:41.797 回答