Failed to invoke procedure `apoc.load.json`: Caused by: java.lang.RuntimeException: Import from files not enabled, please set apoc.import.file.enabled=true in your neo4j.conf


(Bi Y Tcc K Ciu) #1

Hi there. I have tried to use a *.cypher file to import using my terminal (Mac OS X here, Neo4j Desktop version), with the apoc load json command inside the file.

The very same cypher that exists in the file, works when pasting into the browser but when I run it in the terminal I get the message (in the title)

Failed to invoke procedure apoc.load.json: Caused by: java.lang.RuntimeException: Import from files not enabled, please set apoc.import.file.enabled=true in your neo4j.conf

Despite the message, it is in fact enabled , which I can also check by running CALL apoc.config.list() which confirms the line.

Unsure as to what is going on.. anyone willing to point me in the right direction?

(it will be annoying to have to manually run my queries)


(Stefan Armbruster) #2

anything suspicious in debug.log? What command are you firing?


(Michael Hunger) #3

How do you run that cypher file? With cypher-shell?


(Bi Y Tcc K Ciu) #4

cat examples.cypher | bin/cypher-shell -u neo4j -p secret --format plain

A version of this. However I deleted the current installation and re-installed... and now it works.. (@michael.hunger too) .. I suspect that having installed Neo4j on my Admin logon and then changed settings in the database in another user (Mac OS X) might be the cause. (but thats only because I now only installed on the non admin user now.

When I re-installed I placed the text

dbms.security.procedures.unrestricted=apoc.export.,apoc.import.
apoc.export.file.enabled=true
apoc.import.file.enabled=true

at the very end of the config file. Does it make a difference where this text gets placed ? ( previously I had it in the same location as the dbms.directories.import=import setting..


(Bi Y Tcc K Ciu) #5

as below Michael...for the moment I think the issue is 'solved' in only that it now works (after re-installing)...possibly there is something that I was doing (maybe in the call itself?) that was slightly incorrect. I'll re-open (if thats possible) if it repeats.