Is apoc.rel.startNode removed from apoc 4.2.0.0? - neo4j

I have neo4j 4.2.1 & apoc 4.2.0.0 installed on my mac. When I run the example on https://neo4j.com/labs/apoc/4.2/overview/apoc.rel/apoc.rel.startNode/ in neo4j desktop, I get the following error:
Unknown function 'apoc.rel.startNode' (line 4, column 8 (offset: 204))
"RETURN apoc.rel.startNode(rel) AS startNode"
I am able to successfully run the example on https://neo4j.com/labs/apoc/4.2/overview/apoc.rel/apoc.rel.type/
Does anyone know what is wrong? Thanks!

In 4.x, APOC core procs/functions are bundled with Neo4j and can be moved from the labs folder to the plugins folder for installation. It's possible that the function in question wasn't included in this core library.
You can look for and download the appropriate full version of APOC here, that will include functions and procedures beyond what is contained in the APOC core library.
https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases
Make sure you remove the existing jar when you add in the full jar, as if you try to start up with both in the plugins folder you'll encounter errors.

Related

Neo4J crashes after installing APOC plugin

I'm trying to install the APOC Full jar file (4.2.0.6) to my Neo4J instance that's running in a Google Compute VM. To do so, I've installed the JAR file from GitHub releases to the /plugins folder. Each time I restart or run the environment it crashes with the following output to logs:
"Some jar procedure files (apoc-4.2.0.6-all.jar) are invalid, see log for details."
There's really no additional details provided...
If I copy the default APOC Core library found withing /labs, it works. I've tried to download this same file from Github and it fails. I've verified that the same user/group permissions are applied to the downloaded file as well.
Any ideas?
This usually happens for two reasons:
First is version mismatch. You can check which version you should use based on the version matrix, which is available at: https://github.com/neo4j-contrib/neo4j-apoc-procedures#version-compatibility-matrix. Unfortunately, it is not always up to date, but the APOC versions are if I understand correctly:
APOC 4.1.x.x -> Neo4j 4.1.x
APOC 4.2.x.x.-> Neo4j 4.2.x
APOC 4.3.x.x -> Neo4j 4.3.x
If I had to guess, you are probably using Neo4j 4.3 or 4.1 and using an APOC that is designed to work with Neo4j 4.2.
The other issue is that sometimes you have multiple APOC plugin files in the plugin folders, so that will also crash Neo4j.

Neo4J 4 + Apoc : Unable to set up injection for procedure 'Static'

Getting the following error on neo4j server startup with the apoc plugin.
Have copied the jar to the plugins folder.
Caused by:
org.neo4j.kernel.api.exceptions.ComponentInjectionException: Unable to
set up injection for procedure 'Static', the field 'apocConfig' has
type 'class apoc.ApocConfig' which is not a known injectable component
Neo4j version: 4.0.4
Apoc version: 4.0.0.13
What could be the problem?
I would suggest reviewing the installation procedure to see if you missed any steps,
https://neo4j.com/docs/operations-manual/current/installation/linux/
Also, double check the java version that neo4j is using, and check if there are any other local java environment factors specific to this install. class paths, other jars, etc.
We were having the same issue with neo4j 4.x and custom plugin folder.
Updating custom plugin folder in neo4j config didn't work, we had to add folder (or extension) into java CP (classpath) as well.
It worked in 3.x neo4j version without adding a folder into the classpath.
Try to make sure that you have plugins folder listed in -cp and might work for you.
Similar to Ilija's problem, our embedded database (using Eclipse with the Maven plugin) did not like our custom plugin folder.
Since the database was for setup and then deployment (effectively 2 separate things), we could move the database from the default Neo4j directory after it was setup.
As a test, you could delete the contents of your plugin folder and see if it works then.

Error when tring to execute apoc.refactor.mergeNodes

I have neo4j version server 3.5.18 and I've installed apoc version 3.5.0.11. I think that I have correctly modified the conf file in this way
dbms.directories.plugins=/Users/lx2pwnd/Desktop/dev/neo4j-community-3.5.18/plugins
...
dbms.security.procedures.unrestricted=algo.*,apoc.*
...
dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*
But when I try to execute a query which contains CALL apoc.refactor.mergeNodes(..) i get this error:
There is no procedure with the name `apoc.refactor.mergeNodes` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
What's wrong ?
I believe the plugins path needs to be relative to the neo4j installation directory. This is safer, since different neo4j versions can be installed simultaneously, and they may need different plugin versions.
Try changing the dbms.directories.plugins value back to plugins, putting the APOC jar file in the existing plugins directory under your neo4j installation directory, and restarting neo4j.

Neo4j: How could I install APOC on Neo4j Server?

I need to install APOC on Neo4j Server how could I do?
I created a folder "plugins" and after I executed the following command:
dbms.security.procedures.unrestricted=apoc.*
But I have this error:
Neo.ClientError.Statement.SyntaxError: Invalid input 'b': expected 'r/R' or
'e/E' (line 1, column 2 (offset: 1))
"dbms.security.procedures.unrestricted=apoc.*"^
Install the APOC jar from GitHub according to your Neo4j version by copying it to the plugins folder.
Add the property you mentioned, dbms.security.procedures.unrestricted=apoc.* to the end of your neo4j.conf file (located in the conf folder of your Neo4j installation.
The error you provided suggests you didn't add the property to the neo4j.conf file, but somehow entered it as a command in a Cypher query or something similar.
For anyone facing issues with restarting Neo4j instance after placing the apoc jar in the plugins folder: Latest version of the APOC jar doesn't work with all Neo4j installations. One needs to use the right APOC version.
For example, You can find the compatibility matrix for 3.2 version of Neo4j here: https://neo4j-contrib.github.io/neo4j-apoc-procedures/index32.html#_version_compatibility_matrix

Neo4j plugin : can't use the spatial procedures after installing neo4j spatial plugin

So I have neo4j3.1.4 community edition, and tried to put neo4j spatial plugin jar v0.24 file under the "E:\softwares\Neo4j CE 3.2.0\plugins" directory. "E:\softwares\Neo4j CE 3.2.0\" is my neo4j installation directory. I couldn't find any of th procedures of spatial from cypher through browser. But I seem to have done exactly what the manual told me.
Judging from the installation path I'd say you actually have Neo4j 3.2.0 running, no ? Anyway (shouldn't make a difference really), if you take the latest release from https://github.com/neo4j-contrib/spatial/releases/download/0.24-neo4j-3.1.1/neo4j-spatial-0.24-neo4j-3.1.1-server-plugin.jar, drop it into the plugins directory and then restart (don't forget that) Neo4j, things should work. You can verify if the spatial-procedures are there with a CALL dbms.procedures(). If not, please verify the neo4j.log file ... there are multiple messages about loading "geometry" related stuff in there if things go well (or you may see the reason it's not loading otherwise).
Also, and again judging from your installation directory, I think you may have used the Windows installer ? If so, the plugins directory is actually located at C:\Users\youruser\Documents\Neo4j\default.graphdb\plugins, not in the installation directory.
Hope this helps,
Tom

Resources