APOC is only partially installing its extension in neo4j (one procedure)

10,536

Solution 1

There is a poorly documented difference between installing neo4j using an installer (which is most common) versus from a zip or tar file.

(A) When you install neo4j using an installer, the installer configures the neo4j server to look for the plugins folder in the database folder (i.e., under the default.graphdb folder).

(B) When you install neo4j from a zip or tar file, the neo4j server will look for the plugins folder in the neo4j installation folder (for example, the plugins folder should be a sibling of the neo4j bin folder).

It sounds like (A) applies to you.

Solution 2

From what I remember, you have to create a plugins directory into your graph.db directory, put the apoc jar, and restart you server.

Otherwise you can specify the dbms.directories.plugins in neo4j.conf file.

Solution 3

The answers by @cybersam and @logisima are absolutely correct. However, since I'm using a Red Hat Linux specifically Oracle-7, I had to add an additional step to it as well. This is how I got it working

  1. Download the apoc-<version>.jar into the /var/lib/neo4j/plugins directory
  2. chown neo4j:neo4j apoc-<version>.jar
  3. chmod 755 apoc-<version>.jar
  4. Open the neo4j.conf at /etc/neo4j/neo4j.conf and replace the line #dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.* with dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*,apoc.* and save it.
  5. Restart the Neo4j service by issuing the command systemctl restart neo4j

Note: Make sure that you have the right version of apoc jar downloaded. I'm using the neo4j version 3.5.5 and the apoc jar version I'm using is apoc-3.5.0.3-all.jar. Alos make sure that you have the dbms.directories.plugins=/var/lib/neo4j/plugins uncommented in the /etc/neo4j/neo4j.conf

Solution 4

The problem is that you used windows installer for neo4j, which seems doesnt work with plugins. so you must use the neo4j binaries which are working okay.

What that means is that you have to download the zip version for the windows installation and follow the instructions here:

http://neo4j.com/docs/operations-manual/current/installation/windows/

edit:

I think this is you case

if not

maybe this

Share:
10,536
Dr.YSG
Author by

Dr.YSG

PhD (CS) working in a broad area of technologies: Big Data GPU computing &amp; Non-Von-Neumann programming Cloud Computing Massive distributed gaming (scientific simulations) Computer Vision, Robotics Augmented Reality Mobile GIS 2D/3D Simulation &amp; Virtual Reality serious games 3D Graphics HTML5 for offline mobile apps Data &amp; Info Visualization MultiMedia Real-time collaboration (mobile tech) User Interfaces (video and NUI) as well as Human Centered Design NodeJS,Express, OGMA, Neo4j Graph Database React, Redux, Redux-Thunk, Redux-Form, Electron, the Redux Ecosystem

Updated on June 21, 2022

Comments

  • Dr.YSG
    Dr.YSG about 2 years

    I downloaded apoc-3.1.0.3-all.jar and placed it in the plugins for my windows7 Neo4J 3.1.1 system.

    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)
    

    Killed the Neo4J process on the computer, and then restated the server.

    I am only seeing one apoc procedure listed, others give an error about missing procedure. ThereNo sign of errors in the neo4j log. I tried unblocking the jar, and restarting the server. No luck.

    I have no problem with doing

    Call db.schema()
    

    But something as simple as:

    CALL apoc.help("help")
    

    will result in a

    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.
    

    What am I doing wrong, I assume it must be me!)

    $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?)
    
  • Dr.YSG
    Dr.YSG over 7 years
    I tried a lot of what you suggested, but I am still blocked. see updated post.
  • Dr.YSG
    Dr.YSG over 7 years
    So this sounds odd. You seem to indicate that plugin-in are on a per-DB basis (in the DB folder). But what I am seeing is that they seem to be a server resource, and there is a folder in the program executables called: C:\Program Files\Neo4j CE 3.1.1\plugins which has a README which says put them there. So that where I put the Jar, and it did find one procedure, but not the rest.
  • Dr.YSG
    Dr.YSG over 7 years
    Do you have some evidence that the NEO4j installer does not work? Note that one procedure is found, and that would not be true if the folder could not be read.
  • logisima
    logisima over 7 years
    What happen if you type CALL apoc.schema.assert({Foo:['bar']},null) in the browser ? Have you test to configure the dbms.directories.plugins settings like I have suggested ? Is there something in logs at startup ?
  • Dr.YSG
    Dr.YSG over 7 years
    CALL apoc.schema.assert({Foo:['bar']},null) worked fine. There is nothing in the startup. I did not try the configuration item, since it seems to find at least one procedure in the JAR, and how would it find that, if it was not getting to the folder where the jar is?
  • Dr.YSG
    Dr.YSG over 7 years
    Yes, I needed to add "dbms.directories.plugins=c:/Program\ Files/Neo4j\ CE\ 3.1.1/plugins" to the config file. Thanks. I will give you a bounty