Crash when apoc.import.file.enabled=true in Neo4j 5.x

Does anyone encounter crashes in Neo4j 5.x (1, 2, 3, 4) while defining at the configuration file the **apoc.import.file.enabled=**true? (Neo4j Desktop - APOC plugin installed successfully)

Of course in Neo4j 4.x everything works properly.

It's also worth to mention that there is no procedure runFile at the APOC Library when you call to show the APOC procedures in Neo4j Browser.

@damisg7

crashes? when?

and is **apoc.import.file.enabled=**true defined in conf/neo4j.conf or conf/apoc.conf?

Neo4j configuration file

@damisg7

Your comment of

>>Neo4j configuration file

i presume this is to indicate conf/neo4j.conf? correct?

if you move it to conf/apoc.conf ( and you may need to create said file ) does the 'crash' go away?

But 'crash' are there any more specifics?

And if it doesnt go away what apoc jar files is in plugins/

Powershell : Failed to read config C:\Users\damis\.Neo4jDesktop\relate-data\dbmss\dbms-44e71194-f228-413e-b0f1-c65caa35 b8b2\conf\neo4j.conf: Unrecognized setting. No declared setting with name: apoc.import.file.enabled. Cleanup the config or disable 'server.config.strict_validation.enabled' to continue.

Yes under the neo4j.conf as I was doing for the previous versions too. APOC is installed properly from the Neo4j Desktop GUI. I pasted the message I found @ neo4j-relate log file.

@damisg7

Per my last update

>>if you move it to conf/apoc.conf ( and you may need to create said file ) does the 'crash' go away?

New Info: When I define the server.config.strict_validation.enabled=false, the DB starts properly. However it seems that it doesn't recognize the **apoc.import.file.enabled=**true as i cannot run the function runFile. Also, when I check the list of procedures with SHOW PROCEDURES, I don't find anywhere the cypher.runFile.

What @dana_canzano was explaining is the ‘apoc.import.file.enabled=true’ setting goes in the ‘apoc.conf’ file, not neo4j.conf file. You get the error because it checks the neo4j.conf file to ensue it has supported settings. You disabled the check when you set the validation to false. That allowed the database to start with the invalid configuration in neo4j.conf. To fix this issue, create an apoc.conf file in the configuration folder. I had to create mine, as it is not there by default. Place the apoc import configuration in there and restart. You should also remove disabling the validation check too. That should resolve the server not starting.

In v5, the apoc library is split into a core library and an extended library. apoc.cypher.runFile procedure is in the extended jar. You need to download the jar and place it in the plug-ins folder and restart.

Docs

Jar download

Hi,

I've got the same issue.

@glilienfield I did excatly what you mentionned :

  • Create an apoc.conf file with apoc.import.file.enabled=true
  • Donwload the lib extended apoc and added to the pluggin folder :

i restarted and try to import an xml file and i still get an error

Desktop Version 5.3.0

Thanks

it's ok for me now,

I started to import XML with the "exemple project" provided when you install.
I create a new project et re-do all actions :

  • install pluggin
  • create apoc.conf file
  • restart

and it was fine !

I think there is something wrong with the example project, i hope it will help.

Thanks

2 Likes