Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
APOC仅在neo4j中部分安装其延长件(一个步骤)_Neo4j_Neo4j Apoc - Fatal编程技术网

APOC仅在neo4j中部分安装其延长件(一个步骤)

APOC仅在neo4j中部分安装其延长件(一个步骤),neo4j,neo4j-apoc,Neo4j,Neo4j Apoc,我下载了apoc-3.1.0.3-all.jar并将其放入windows7 Neo4J 3.1.1系统的插件中 C:\Users>java -version java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode) 在计算机上终止Neo4J进程,然后重新声明服务

我下载了apoc-3.1.0.3-all.jar并将其放入windows7 Neo4J 3.1.1系统的插件中

C:\Users>java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
在计算机上终止Neo4J进程,然后重新声明服务器

我只看到列出了一个apoc程序,其他人给出了一个关于缺少程序的错误。neo4j日志中没有错误的迹象。我尝试取消阻止jar,并重新启动服务器。不走运

我做这件事没有问题

Call db.schema()
但简单地说:

CALL apoc.help("help")
将导致

There is no procedure with the name `apoc.help` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
我做错了什么,我想一定是我!)


问题是您使用了windows installer for neo4j,它似乎不适用于插件。因此,您必须使用运行正常的neo4j二进制文件

这意味着您必须下载用于windows安装的zip版本,并按照此处的说明进行操作:

编辑:

如果不是


根据我的记忆,您必须在graph.db目录中创建一个
plugins
目录,放入apoc jar,然后重新启动服务器


否则,您可以在
neo4j.conf
文件中指定
dbms.directories.plugins

使用安装程序(这是最常见的)安装neo4j与从zip或tar文件安装neo4j之间存在着一个缺乏文档记录的差异

(A) 使用安装程序安装neo4j时,安装程序会将neo4j服务器配置为在数据库文件夹中查找
plugins
文件夹(即
default.graphdb
文件夹下)

(B) 当您从zip或tar文件安装neo4j时,neo4j服务器将在neo4j安装文件夹中查找
plugins
文件夹(例如,
plugins
文件夹应该是neo4j
bin
文件夹的同级文件夹)


听起来(A)适用于你。

由@cybersam和@logisima给出的答案绝对正确。然而,由于我使用的是Red Hat Linux,特别是Oracle-7,因此我还必须添加一个附加步骤。我就是这样让它工作的

  • 将下载到
    /var/lib/neo4j/plugins
    目录中
  • chown neo4j:neo4j apoc-.jar
  • chmod 755 apoc-.jar
  • /etc/neo4j/neo4j.conf
    打开neo4j.conf,将行
    #dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*
    替换为
    dbms.security.procedures.whitelist=apoc.coll.*,apoc.*
    ,然后保存它
  • 通过发出命令
    systemctl Restart Neo4j

  • 注意:确保下载了正确版本的apoc jar。我使用的是
    neo4j版本3.5.5
    ,我使用的apoc-jar版本是
    apoc-3.5.0.3-all.jar
    。Alos请确保您拥有
    dbms.directories.plugins=/var/lib/neo4j/plugins
    中未注释的
    /etc/neo4j/neo4j.conf

    我尝试了很多您建议的内容,但仍然被阻止。请参阅更新的帖子。您是否有证据表明NEO4j安装程序不起作用?请注意,找到了一个过程,如果无法读取文件夹,则不会出现这种情况。因此,这听起来很奇怪。您似乎指出插件是基于每个DB的(在DB文件夹中)。但我看到的是,它们似乎是一个服务器资源,在程序可执行文件中有一个名为:C:\program Files\Neo4j CE 3.1.1\plugins的文件夹,它有一个自述文件,上面写着把它们放在那里。所以我把Jar放在那里,它确实找到了一个过程,但没有找到其余的。如果在浏览器中键入
    调用apoc.schema.assert({Foo:['bar']},null)
    ,会发生什么?你有没有测试过像我建议的那样配置
    dbms.directories.plugins
    设置?启动时日志中有什么东西吗?调用apoc.schema.assert({Foo:['bar']},null)工作正常。启动中没有任何内容。我没有尝试配置项,因为它似乎在JAR中找到了至少一个过程,如果它没有到达JAR所在的文件夹,它将如何找到它?是的,我需要在配置文件中添加“dbms.directories.plugins=c:/Program\Files/Neo4j\CE\3.1.1/plugins”。谢谢我会给你一笔赏金你在点击“选项”按钮后把它放进“选项”窗格上显示的插件文件夹了吗?
    $call dbms.procedures
    
    apoc.schema.assert  apoc.schema.assert(indexes :: MAP?, constraints :: MAP?) :: (label :: STRING?, key :: LIST? OF STRING?, unique :: BOOLEAN?, action :: STRING?)  (empty)
    db.awaitIndex   db.awaitIndex(index :: STRING?, timeOutSeconds = 300 :: INTEGER?) :: VOID   Wait for an index to come online (for example: CALL db.awaitIndex(":Person(name)")).
    db.constraints  db.constraints() :: (description :: STRING?)    List all constraints in the database.
    db.indexes  db.indexes() :: (description :: STRING?, state :: STRING?, type :: STRING?) List all indexes in the database.
    db.labels   db.labels() :: (label :: STRING?)   List all labels in the database.
    db.propertyKeys db.propertyKeys() :: (propertyKey :: STRING?)   List all property keys in the database.
    db.relationshipTypes    db.relationshipTypes() :: (relationshipType :: STRING?) List all relationship types in the database.
    db.resampleIndex    db.resampleIndex(index :: STRING?) :: VOID  Schedule resampling of an index (for example: CALL db.resampleIndex(":Person(name)")).
    db.resampleOutdatedIndexes  db.resampleOutdatedIndexes() :: VOID    Schedule resampling of all outdated indexes.
    db.schema   db.schema() :: (nodes :: LIST? OF NODE?, relationships :: LIST? OF RELATIONSHIP?)   Show the schema of the data.
    dbms.changePassword dbms.changePassword(password :: STRING?) :: VOID    Change the current user's password. Deprecated by dbms.security.changePassword.
    dbms.components dbms.components() :: (name :: STRING?, versions :: LIST? OF STRING?, edition :: STRING?)    List DBMS components and their versions.
    dbms.functions  dbms.functions() :: (name :: STRING?, signature :: STRING?, description :: STRING?) List all user functions in the DBMS.
    dbms.procedures dbms.procedures() :: (name :: STRING?, signature :: STRING?, description :: STRING?)    List all procedures in the DBMS.
    dbms.queryJmx   dbms.queryJmx(query :: STRING?) :: (name :: STRING?, description :: STRING?, attributes :: MAP?)    Query JMX management data by domain and name. For instance, "org.neo4j:*"
    dbms.security.changePassword    dbms.security.changePassword(password :: STRING?) :: VOID   Change the current user's password.
    dbms.security.createUser    dbms.security.createUser(username :: STRING?, password :: STRING?, requirePasswordChange = true :: BOOLEAN?) :: VOID    Create a new user.
    dbms.security.deleteUser    dbms.security.deleteUser(username :: STRING?) :: VOID   Delete the specified user.
    dbms.security.listUsers dbms.security.listUsers() :: (username :: STRING?, flags :: LIST? OF STRING?)   List all local users.
    dbms.security.showCurrentUser   dbms.security.showCurrentUser() :: (username :: STRING?, flags :: LIST? OF STRING?) Show the current user.STRING?)