Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-09-2019 10:50 PM
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...?
Solved! Go to Solution.
06-23-2021 01:36 PM
Hi, I faced same issue and was able to resolve it by creating the "apoc.conf" file as suggested here. Just to elaborate on the steps:
Step:1
To traverse to the Dbms folder, click the three dots (...), go to "open folder" -> DBMS, the dbms folder will open, then navigate to "conf" folder inside it & you could find the "neo4j.conf" file. Now you need to create a new "apoc.conf" file.
Step2:
In the dbms folder -> open “conf” folder -> create a new “apoc.conf” file by opening a notepad, then type the following 2 lines and save files as “.conf” file under “all files” in the same “conf” folder.
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=true
Step: 3
Restart the dbms
01-09-2019 11:13 PM
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
01-10-2019 12:13 AM
Hi,
Launch Neo4j Desktop, click on'Manage' button. Click on the down arrow next to 'Open Folder'.
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
01-10-2019 03:32 AM
actually settings==neo4j.conf are directly manageable in neo4j desktop
01-10-2019 03:54 AM
Perfect thanks, you saved my day!
01-14-2019 03:43 PM
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 procedure
apoc.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.
01-14-2019 06:33 PM
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.
01-15-2019 05:36 AM
@michael.hunger I posted it here only because I thought it might be somewhat relevant. I will address future questions in separate posts.
12-14-2020 05:00 PM
Did this get turned into a new topic? I couldn't find it in your topics and searching load
. The suggested solution of adding file:
in this thread doesn't work for me.
04-03-2020 09:26 AM
How will I able to this in GrapheneDB instance ?
06-08-2020 06:44 AM
I just created a new Neo4j enterprise on GCP and I have a JSON file in /var/lib/neo4j/import folder. when I am trying to read a file using this code ( call apoc.load.json("
file://comments.json
") yield value return value limit 5
), i get the below error
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 apoc.conf
I could see apoc.import.file.enabled=true
in neo4j.conf file but i am unable to find apoc.conf anywhere in server. The cluster where I am looking or running queries is the LEADER node. I didnt get this issue last time but today I just deleted the old cluster and re-created a new node from scratch and started facing this issue. Can someone please tell me what is that I am missing here.
06-08-2020 05:39 PM
What version of neo4j are you running? for 4.+ it's apoc.conf (you need to create it) and 3.5.x it's neo4j.conf
you also need three slashes file:///
07-14-2020 05:22 AM
I am using neo4j 4.1. Should apoc.conf file be placed in the same folder as neo4j.conf file?
07-21-2020 08:37 AM
This is still unanswered, correct ? Should we put it IN the neo4j file or in its own apoc.conf in the same directory
Thanks
07-21-2020 08:50 AM
Still not working, and I am mildly confused.
I went ahead and added those 3 statements to neo4j.con - same error
I created an apoc.conf with those. Same error.
Now I am lost. Any more thoughts ?
07-21-2020 12:50 PM
After launching the Desktop you will see the database you created. At left top corner you will see three circles. Clicking on it displays the a list and select Manage. When it opens up you will Plugins. When clicked it shows the APOC and GDS library. Click on install one at a time and this will instal the libraries and updates the neo4j.conf file.
Once done click on Start button and it should start if everything goes well.
07-21-2020 03:35 PM
No luck
Uninstalled APOC and GDS
Reinstalled both
apoc.conf was not created and my import failed
but I got a new neo4j.conf so i added these lines
#********************************************************************
#********************************************************************
apoc.trigger.enabled=true
apoc.ttl.enabled=true
apoc.file.import.enabled=true
Still no luck
added apoc.conf to the same directory
No luck
07-21-2020 03:39 PM
Hello
Did you have a look at the documentation?
Options that can be added to the apoc.conf
file.
Regards,
Cobra
07-21-2020 03:58 PM
Yes, I read it. But there were 3 issues.
apoc.load.json
: Caused by: java.lang.RuntimeException: Import from files not enabled, please set apoc.import.file.enabled=true in your apoc.conf" So I created one with that line in it ( see above) based MichaelHungers post (jan 19th)So at this point, I have a self created apoc.conf and a modified neo4j.conf and neither is solving the issue.
07-21-2020 04:07 PM
The apoc.conf
file must be created manually (next to neo4j.conf file) because it's not necessary for other procedures.
In this file, you must write:
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=true
After, you must restart your database in order to apply changes
01-09-2021 02:02 AM
this does not work. I got this as error
There is no procedure with the name apoc.export.csv.data
registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
01-13-2021 02:21 PM
I guess you didn't install apoc correctly? Does the rest of APOC work for you?
.e.g call apoc.help("")
06-23-2021 01:36 PM
Hi, I faced same issue and was able to resolve it by creating the "apoc.conf" file as suggested here. Just to elaborate on the steps:
Step:1
To traverse to the Dbms folder, click the three dots (...), go to "open folder" -> DBMS, the dbms folder will open, then navigate to "conf" folder inside it & you could find the "neo4j.conf" file. Now you need to create a new "apoc.conf" file.
Step2:
In the dbms folder -> open “conf” folder -> create a new “apoc.conf” file by opening a notepad, then type the following 2 lines and save files as “.conf” file under “all files” in the same “conf” folder.
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=true
Step: 3
Restart the dbms
07-02-2021 10:59 AM
oh man thank you so much for this!
I thought I was going crazy!
01-20-2021 05:05 PM
Hi! I would like to clarify if the following is a bug for Neo4j 4++ (4.2.1 Desktop):
After creating apoc.conf
file with apoc.export.file.enabled=true
line. I restarted Neo4j DB, and was able to call a simple export function
call apoc.export.csv.query('MATCH (n) RETURN (n) LIMIT 10', 'hello.csv',{})
I would like to programmatically check if this setting is enabled in my code before I make the export call. However, when I do call dbms.listConfig()
, it shows that it is still set to "false".
The same happens for apoc.import.file.enabled=true
.
I will do a workaround to parse the apoc.conf
file for now. But my guess is this is a bug that is a result of Neo4j 3.5+ config..
08-16-2022 10:22 AM
Hey Shern !
I have the same issue/confusion you have
I would like to programmatically check if this setting is enabled in my code before I make the export call. However, when I do
call dbms.listConfig()
, it shows that it is still set to "false".
The same happens forapoc.import.file.enabled=true
.I will do a workaround to parse the
apoc.conf
file for now. But my guess is this is a bug that is a result of Neo4j 3.5+ config..
I can confirm that my apoc plugin is well installed (I can see the apoc procedures when I do the following query: CALL dbms.procedures() YIELD name, signature RETURN name, signature;)
I am using the helm chart, so my apoc configs looks like this
apoc_config:
apoc.trigger.enabled: "false"
apoc.ttl.enabled: "false"
apoc.export.file.enabled: "false"
apoc.import.file.enabled: "false"
apoc.import.file.allow_read_from_filesystem: "true"
apoc.uuid.enabled: "true"
apoc.import.file.use_neo4j_config: "true"
apoc.jobs.scheduled.num_threads: "10"
apoc.jobs.pool.num_threads: "10"
I can see that it appears in the container under /config/apoc.conf (there is also a /config/neo4j.conf in there which is a symlink to /var/lib/neo4j/conf/neo4j.conf.
Now I am not sure if the neo4j binary tries to load the config from /config/ or /var/lib/neo4j/conf location.
Apoc.conf doesn't exist in /var/lib/neo4j/conf and doing "CALL dbms.listConfig();" doesn't show up my customs settings.
call dbms.listConfig("apoc");
+---------------------------------------------------------------------------------------------------------------------------+
| name | description | value | dynamic |
+---------------------------------------------------------------------------------------------------------------------------+
| "apoc.export.file.enabled" | "apoc.export.file.enabled, a boolean" | "false" | FALSE |
| "apoc.import.file.enabled" | "apoc.import.file.enabled, a boolean" | "false" | FALSE |
| "apoc.import.file.use_neo4j_config" | "apoc.import.file.use_neo4j_config, a boolean" | "true" | FALSE |
| "apoc.initializer.cypher" | "apoc.initializer.cypher, a string" | "No Value" | FALSE |
| "apoc.jobs.pool.num_threads" | "apoc.jobs.pool.num_threads, a long" | "No Value" | FALSE |
| "apoc.jobs.queue.size" | "apoc.jobs.queue.size, a long" | "No Value" | FALSE |
| "apoc.jobs.scheduled.num_threads" | "apoc.jobs.scheduled.num_threads, a long" | "No Value" | FALSE |
| "apoc.trigger.enabled" | "apoc.trigger.enabled, a boolean" | "false" | FALSE |
| "apoc.ttl.enabled" | "switches TTL feature on or off" | "false" | FALSE |
| "apoc.ttl.limit" | "maximum number of nodes to be deleted during one iteration" | "1000" | FALSE |
| "apoc.ttl.schedule" | "how often does TTL expiry check run in background" | "1m" | FALSE |
| "apoc.uuid.enabled" | "apoc.uuid.enabled, a boolean" | "false" | FALSE |
+---------------------------------------------------------------------------------------------------------------------------+
Are the settings loaded ? are they not ? Shouldn't it be be more straight forward ?
08-16-2022 10:28 AM
I also tried to show the apoc settings using the query found in the documentation but it doesn't work, not too sure why
https://neo4j.com/labs/apoc/4.4/overview/apoc.config/apoc.config.list/
08-16-2022 11:51 AM
oh god I think I just figured it out.
This give me the cue I needed:
So it seems we must select a user database to get the current Apoc version, and its seems to apply the same for Apoc config values !
When I use a custom database, I can run this big query and see my custom apoc config values.
However, even if I have selected a custom database, I still don't see them when I run
05-01-2022 01:03 AM
I'm using the Neo4j 4.4.5 Community Edition AMI from AWS Marketplace on EC2 and I tried the adding the following lines to /var/lib/neo4j/conf/apoc.conf with no luck:
apoc.trigger.enabled=true
apoc.import.file.use_neo4j_config=true
What worked for me was to add those lines to /etc/neo4j/neo4j.template instead and restart the server. Unfortunately this AMI was recently discontinued so I'm not sure how helpful this will be in the future, but it solved my problem.
08-03-2022 02:03 AM
Neo4j 4.4.9. Same issue. Tried to add apoc.import.file.enabled=true to neo4j.conf.
Tried to create a file apoc.conf and write apoc.import.file.enabled=true apoc.import.file.use_neo4j_config=true.
Tried to create a file neo4j.template and write
apoc.trigger.enabled=true
apoc.import.file.use_neo4j_config=true
But nothing works. Does someone have some idea?
All the sessions of the conference are now available online