Search code examples
reactjsneo4jcyphercentos7neo4j-apoc

Neo4j APOC configuration not working on the CentOS 7


I have deployed a ReactJS application with neo4j database on CentOS 7 server. Neo4j version is 4.4.2. The application also uses apoc library. So i added apoc-4.4.0.1-all.jar file to the /var/lib/neo4j/plugins directory on the server. Then i did following-

  1. chown neo4j:neo4j apoc-4.4.0.1-all.jar

  2. chmod 755 apoc-4.4.0.1-all.jar

  3. Modify /etc/neo4j/neo4j.conf file to

    • dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*,apoc.*

    • dbms.security.procedures.unrestricted=apoc.*

    • uncomment dbms.directories.plugins=/var/lib/neo4j/plugins

  4. systemctl restart neo4j

After deploying the project, when i open the application on the browser and insert some values in a form, it shows following error-

Unknown function 'apoc.map.submap' (line 3, column 14 (offset: 56)) " WHERE apoc.map.submap(properties(n), keys(obj), [], false) = obj" ^

Did i miss anything in apoc configuration ?


Solution

  • The ownership of /var/lib/neo4j/data folder has to be neo4j, not root