在Neo4j桌面社区版2.3.0上没有加载Spatial扩展/插件

时间:2016-01-25 20:20:10

标签: maven neo4j spatial

安装Spatial插件并反复重复后,我仍然无法让Neo4j加载扩展程序。

我将Neo4j Community Edition 2.3.0neo4j-spatial-0.15-neo4j-2.3.0

一起使用

从命令行开始:

$:~ levi$ java -jar ./databases/Neo4j\ Community\ Edition\ 2.3.0.app/Contents/Resources/app/bin/neo4j-desktop-2.3.0.jar 
2016-01-25 14:05:15.687-0600 INFO  [o.n.s.d.LifecycleManagingDatabase] Successfully started database
2016-01-25 14:05:15.722-0600 INFO  [o.n.s.CommunityNeoServer] Starting HTTP on port 7474 (4 threads available)
2016-01-25 14:05:16.047-0600 INFO  [o.n.s.w.Jetty9WebServer] Mounting static content at /webadmin
2016-01-25 14:05:16.105-0600 INFO  [o.n.s.w.Jetty9WebServer] Mounting static content at /browser
Jan 25, 2016 2:05:16 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Jan 25, 2016 2:05:17 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Jan 25, 2016 2:05:17 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
2016-01-25 14:05:17.803-0600 INFO  [o.n.s.CommunityNeoServer] Remote interface ready and available at http://localhost:7474/

并使用curl:

curl -v http://neo4j:password@localhost:7474/db/data/

*   Trying ::1...
* connect to ::1 port 7474 failed: Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 7474 (#0)
* Server auth using Basic with user 'neo4j'
> GET /db/data/ HTTP/1.1
> Host: localhost:7474
> Authorization: Basic bmVvNGo6dG93bmVy
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Mon, 25 Jan 2016 20:09:03 GMT
< Content-Type: application/json; charset=UTF-8
< Access-Control-Allow-Origin: *
< Content-Length: 730
< Server: Jetty(9.2.z-SNAPSHOT)
< 
{
  "extensions" : { },
  "node" : "http://localhost:7474/db/data/node",
  "node_index" : "http://localhost:7474/db/data/index/node",
  "relationship_index" :     "http://localhost:7474/db/data/index/relationship",
  "extensions_info" : "http://localhost:7474/db/data/ext",
  "relationship_types" :     "http://localhost:7474/db/data/relationship/types",
  "batch" : "http://localhost:7474/db/data/batch",
  "cypher" : "http://localhost:7474/db/data/cypher",
  "indexes" : "http://localhost:7474/db/data/schema/index",
  "constraints" : "http://localhost:7474/db/data/schema/constraint",
  "transaction" : "http://localhost:7474/db/data/transaction",
  "node_labels" : "http://localhost:7474/db/data/labels",
  "neo4j_version" : "2.3.0"
* Connection #0 to host localhost left intact

目录结构如下所示:

app/resources/
app/resources/bin/neo4j-desktop-2.3.0.jar
app/resources/plugins/neo4j-spatial-0.15-neo4j-2.3.0
app/resources/plugins/neo4j-spatial-0.15-neo4j-2.3.0/neo4j-spatial-0.15-neo4j-2.3.0.jar
app/resources/plugins/neo4j-spatial-0.15-neo4j-2.3.0/_all_helper_files

相关堆栈问题:Installing neo4j-spatial on neo4j 2.3.1

2 个答案:

答案 0 :(得分:0)

我对你用来启动Neo4j的方法感到有些困惑。看起来您正在使用Neo4j桌面应用程序,但是从命令行启动它?您是否尝试从桌面应用程序启动?

此外,目录结构可能有点偏。您希望空间扩展jar(以及所有依赖项jar)位于plugins目录的根目录中。如果您点击&#34;选项&#34;在桌面应用程序中,您将看到插件的默认目录,可以进行配置:

enter image description here

答案 1 :(得分:0)

我设法通过从源代码构建来实现这一目标。

$ brew install maven

特别克隆的0.15-neo4j-2.3分支。

编译/安装使用: $ mvn install

将名为neo4j-spatial-0.15-neo4j-2.3.1-server-plugin的目录直接复制到neo4j/plugins目录。

启动服务器然后: $ curl -v http://neo4j:password@127.0.0.1:7474/db/data/

{
  "extensions" : {
    "SpatialPlugin" : {
      "addNodesToLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/addNodesToLayer",
      "addEditableLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/addEditableLayer",
      "addCQLDynamicLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/addCQLDynamicLayer",
      "findGeometriesWithinDistance" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesWithinDistance",
      "updateGeometryFromWKT" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/updateGeometryFromWKT",
      "addGeometryWKTToLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer",
      "getLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/getLayer",
      "findClosestGeometries" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/findClosestGeometries",
      "addSimplePointLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer",
      "findGeometriesInBBox" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesInBBox",
      "addNodeToLayer" : "http://127.0.0.1:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer"
    }
  },
  "node" : "http://127.0.0.1:7474/db/data/node",
  "node_index" : "http://127.0.0.1:7474/db/data/index/node",
  "relationship_index" : "http://127.0.0.1:7474/db/data/index/relationship",
  "extensions_info" : "http://127.0.0.1:7474/db/data/ext",
  "relationship_types" : "http://127.0.0.1:7474/db/data/relationship/types",
  "batch" : "http://127.0.0.1:7474/db/data/batch",
  "cypher" : "http://127.0.0.1:7474/db/data/cypher",
  "indexes" : "http://127.0.0.1:7474/db/data/schema/index",
  "constraints" : "http://127.0.0.1:7474/db/data/schema/constraint",
  "transaction" : "http://127.0.0.1:7474/db/data/transaction",
  "node_labels" : "http://127.0.0.1:7474/db/data/labels",
  "neo4j_version" : "2.3.0"
}