neo4j安装APOC插件

2021/12/18 23:23:18

本文主要是介绍neo4j安装APOC插件,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

安装方法

只要下载.jar这一个插件包就好了,将下载好的.jar文件直接放到neo4j安装目录下的plugins文件夹目录下,再修改一下配置文件就可以了。

1、APOC下载:

https://github.com/neo4j-contrib/neo4j-apoc-procedures

注意neo4j软件版本要与APOC插件匹配,否则启动neo4j可能报错

apoc versionneo4j version

4.0.0.16#

4.0.6 (4.0.x)

3.5.0.11

3.5.16 (3.5.x)

3.4.0.6

3.4.12 (3.4.x)

3.3.0.4

3.3.6 (3.3.x)

3.2.3.6

3.2.9 (3.2.x)

3.1.3.9

3.1.7 (3.1.x)

 2.将.jar文件复制到neo4j安装目录下的plugins文件夹下

 

3.修改配置文件 

将 dbms.security.auth_enabled=false 的注释去掉

 

 再在文件末尾添加如下参数:

dbms.security.procedures.unrestricted=apoc.*
dbms.memory.pagecache.size=10g
dbms.memory.heap.initial_size=1g
dbms.memory.heap.max_size=4g

 启动neo4j,查看APOC版本

到此,插件安装完毕,可以启动neo4j了

查看APOC版本

RETURN apoc.version() 

插件版本不匹配的话,启动会报错:

Caused by: org.neo4j.kernel.extension.FailedToBuildKernelExtensionException: Failed to build kernel extension KernelExtension:ApocKernelExtensionFactory[APOC] because it is compiled with a reference to a class, method, or field, that is not in the class path: 'org/neo4j/kernel/impl/logging/LogService'. The most common cause of this problem, is that Neo4j has been upgraded without also upgrading allinstalled extensions, such as APOC. Make sure that all of your extensions are build against your specific version of Neo4j.



这篇关于neo4j安装APOC插件的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程