Spatial extension/plugin 不会在 Neo4j 桌面社区版 2.3.0 上加载
Spatial extension/plugin does not load on Neo4j desktop community edition 2.3.0
安装Spatial插件后,反复反复,还是无法让Neo4j加载扩展。
我正在使用 Neo4j Community Edition 2.3.0
和 neo4j-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
相关堆栈问题:
我对您用来启动 Neo4j 的方法感到有点困惑。看起来您正在使用 Neo4j 桌面应用程序,但从命令行启动它?您是否尝试从桌面应用程序开始?
此外,目录结构可能有点不对劲。您希望空间扩展 jar(和所有依赖 jar)位于 plugins
目录的根目录中。如果您在桌面应用程序中单击 "options",您将看到插件的默认目录,可以对其进行配置:
我设法通过从源代码构建来实现它。
$ brew install maven
专门克隆了 0.15-neo4j-2.3
分支。
Compiled/Installed 使用:
$ 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"
}
安装Spatial插件后,反复反复,还是无法让Neo4j加载扩展。
我正在使用 Neo4j Community Edition 2.3.0
和 neo4j-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
相关堆栈问题:
我对您用来启动 Neo4j 的方法感到有点困惑。看起来您正在使用 Neo4j 桌面应用程序,但从命令行启动它?您是否尝试从桌面应用程序开始?
此外,目录结构可能有点不对劲。您希望空间扩展 jar(和所有依赖 jar)位于 plugins
目录的根目录中。如果您在桌面应用程序中单击 "options",您将看到插件的默认目录,可以对其进行配置:
我设法通过从源代码构建来实现它。
$ brew install maven
专门克隆了 0.15-neo4j-2.3
分支。
Compiled/Installed 使用:
$ 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"
}