cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j-admin import Java problem, Windows 10

I have an old Windows 10 machine that is getting flaky, so I got a new one, and I am having trouble running neo4j-admin on it. I can bring up the Neo4j browser just fine, but I am having issues using neo4j-admin to do an import. I have no problems on the old machine.

Neo4j-admin does not find a Java installation (shouldn't that be established as part of the installation process?) So I added a path variable to point to the java folder, which now seems to be a Zulu version, in C:\Users\ewald.Neo4jDesktop\distributions\java\zulu11.41.23-ca-jdk11.0.8\bin.
Now it finds java, but complains about files that are in the current directory, not a problem I've ever seen before:

C:\Users\ewald\.Neo4jDesktop\relate-data\dbmss\dbms-2080368d-b331-4a9e-9838-48e8efec35cb\import> ..\bin\neo4j-admin import --database BCB --nodes=BCB_nodes.csv --relationships=BCB_links.csv
Selecting JVM - Version:11.0.8, Name:OpenJDK 64-Bit Server VM, Vendor:Azul Systems, Inc.
Invalid value for option '--nodes' at index 0 ([<label>[:<label>]...=]<files>): Invalid nodes file: BCB_nodes.csv (java.lang.IllegalArgumentException: File 'BCB_nodes.csv' doesn't exist)

It doesn't seem to find the input file. This command still works fine on my old computer. I tried uninstalling Neo4j, and reinstalling it, but I get the same result. I tried downloading Oracle's version 11 and creating a path to that; that also didn't work.

7 REPLIES 7

I have the same problem. I tried to run the example from the Using neo4j-admin Tool for Import course.
I've tried to run this command in Windows 10:
..\bin\neo4j-admin import --database crimes --nodes crimes_header.csv,crimes.csv --nodes beats.csv --nodes=PrimaryType=primaryTypes.csv --relationships crimesBeats.csv --relationships=PRIMARY_TYPE=crimesPrimaryTypes.csv --trim-strings=true > import.out

I fixed the issue. The file name needs to be fully specified, all the way from C:. That wasn't the case previously. Don't try to use something like .\nodes.csv for the file name. That won't work.
I hope it works for you.

Yes, it worked. Thank you.

What you mean with full path? For each file the full path should be pointed?

so /Users/name/....../crimes_header.csv, /Users/name/...../crimes.csv  and so on?

 

This is crazy....and it still does not work...I have JAVA 1.8

 

 

../bin/neo4j-admin import --database crimes --nodes crimes_header.csv,crimes.csv --nodes beats.csv --nodes=PrimaryType=primaryTypes.csv --relationships crimesBeats.csv --relationships=PRIMARY_TYPE=crimesPrimaryTypes.csv --trim-strings=tr > import_crime.out

The  command runs for a second without any screen output....and then in the import_crime.out I see the following error message:

ERROR! Neo4j cannot be started using java version 1.8.0_292.
* Please use Oracle(R) Java(TM) 11, OpenJDK(TM) 11 to run Neo4j.
* Please see https://neo4j.com/docs/ for Neo4j installation instructions.
~

 

Finally find answer here: https://neo4j.com/docs/operations-manual/current/tutorial/neo4j-admin-import/

Instead of "--nodes=xxx.csv", use "--nodes=import/xxx.csv". (This makes little sense I think) but works for me.

glilienfield
Ninja
Ninja

Is that file in the database’s ‘import’ folder? The documentation examples show the node and relationship file names prepended with the import path, such as 

--nodes=import/nodes.csv

You can test it that file is in the database’s import folder by executing the following to see if you get data or an error. 

load csv from ‘file:///BCB_nodes.csv’ as row return row limit 1  

 

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online