Failed to invoke procedure `apoc.load.json`: Caused by: java.io.IOException: Cannot open file /test.json for reading

Could someone please assist me with this error

1 Like

@himilp108

Presumably test.json is located in your import diectory, i.e. that which is described by conf/neo4j.conf and dbms.directories.import ( Configuration settings - Operations Manual ).

What version of Neo4j? APOC?
Is Neo4j running on a linux server. Is the file readable by the same linux OS user that the Neo4j database is started as?

Yes, test.json is located in the import directory
Neo4j version 1.4.14
APOC 4.4.0.3

I'm running Neo4j on Mac

@himilp108

ok.. Mac it is. same deal..

. Is the file readable by the same linux OS user that the Neo4j database is started as?

Yes, the file can be read by the os. It opens it up in Firefox

Kind Regards
Himil Parshotam

Every time I've hit this it's a permission issue. Make sure the account that the neo4j service is running under has read permissions on that folder path and file. What you're seeing in firefox is potentially connected as a different user (yourself).

Have you tried LOAD CSV with a delimiter of \u0000 (ascii null) to ensure it can be opened via neo4j?

1 Like

Thanks for the response. How do I see if neo4j has read permissions on that folder and file. I have these commands enabled:
apoc.import.file.enabled = true
apoc.import.file.use_neo4j_config=false

Will LOAD CSV work, seeing as it is a JSON file?

@himilp108

How do I see if neo4j has read permissions on that folder and file. I have these commands enabled:

a OS user started the Neo4j database, i.e. presumably it ran bin\neo4j start or similar.
Does this same OS user than started Neo4j have read permissions against the file test.json?

Thank you, where would I be able to check this?