Setting apoc.import.file.enabled=true in your neo4j.conf


(Dw222ek) #1

I am all new to neo4j and have just downloaded the desktop version running on my Mac. When trying to load a json file with CALL apoc.load.json I get the error message:

Neo.ClientError.Procedure.ProcedureCallFailed: 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

But I cannot find any file named neo4j.conf on my Mac (or even any file/directory named neo4j or similar...) and I haven't found any documentation on how to actually find it and edit it so I hope that someone can help me with this...?


(Kunal Goyal) #2

how is neo4j server running in your system ???
basically in Windows , we have to start server from application and in this application we are having a options button .
when you will click on it will get the neo4j config file option and you can start working on it.

for me it is in below location

AppData\Roaming\Neo4j Community Edition\neo4j.conf

(Ameyasoft) #3

Hi,

Launch Neo4j Desktop, click on'Manage' button. Click on the down arrow next to 'Open Folder'.

neoconf

From the drop down list select 'Configuration' and that will open the folder where neo4j.conf is located.

Copy and save the neo4j.conf file (before editing) as backup. Open with Notepad and uncomment this line (remove '#')

#dbms.security.procedures.unrestricted=apoc.,algo.

and save.

Restart Neo4j Desktop and try.

-Kamal


(Michael Hunger) #4

actually settings==neo4j.conf are directly manageable in neo4j desktop


(Dw222ek) #5

Perfect thanks, you saved my day!


(Michael McKenzie) #6

if i want to load a json file from a local folder, do I drop it in the "import" folder? I am trying

CALL apoc.load.json('financials.json')

and I get the error Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedureapoc.load.json: Caused by: java.lang.RuntimeException: Can't read url or key invalid URL (financials.json) as json: no protocol: financials.json

This is the first time I have tried loading JSON and am just playing around.


(Dw222ek) #7

I had the same problem (don’t understand why…) so I had to use the fully qualified name (starting from the Home directory) as in:

apoc.load.json("file:/users/myuser/desktop/python/wos/graph.json”)

Hope it works for you as well.


(Michael Hunger) #8

For new questions please start a new topic @mckenzma


(Michael McKenzie) #9

@michael.hunger I posted it here only because I thought it might be somewhat relevant. I will address future questions in separate posts.