Import from POSTGRESQL fails with unhelpful error message

I was able to create a connection to my existing POSTGRESQL database and map the desired tables, but the IMPORT DATA step fails, and the log only shows:

COMMAND: java -cp "XXXX/Library/Application Support/Neo4j Desktop/Application/graphApps/_global/neo4j-etl-ui/dist/neo4j-etl.jar" org.neo4j.etl.NeoIntegrationCli export --mapping-file "/var/folders/3s/6q23b6y952d129mdl0jjqshc0000gn/T/postgresql_av_public_mapping.json" --rdbms:password "XXXXX" --rdbms:user "postgres" --rdbms:url "jdbc:postgresql://localhost:5432/av?ssl=false" --options-file "/var/folders/3s/6q23b6y952d129mdl0jjqshc0000gn/T/import-tool-options.json" --using "cypher:fromSQL" --unwind-batch-size 1000 --tx-batch-size 10000 --neo4j:url "bolt://localhost:7687" --neo4j:user "neo4j" --neo4j:password "XXXXX"
- Illegal command (NullPointerException: null)

I don't see anything relevant in any of the log files (neo4j.log, debug.log, etc). In fact, none of the log files appear to be written to as a result of clicking on the "IMPORT DATA" button. All I see are periodic additions to the query.log file seemingly unrelated to this operation. Therefore, I am assuming the failure is in the ETL tool before it connects to the database at all.

This is my first time trying neo4j and it's difficult to evaluate when I can't load my data. Any tips would be appreciated!

MacOS Catalina Version 10.15.7
Neo4j Desktop - 1.3.11
Neo4j ETL Tool version 1.5.1
Neo4j Version: 4.1.3 - enterprise (LOCAL)

I also tried upgrading to Neo4j 4.2.1, then reinstalling the ETL Tool, but that didn't affect the outcome.

My guess is there is a bug with neo4j-etl.jar, where an unexpected NULL is returned (which is why the error is unhelpful....) That obviously needs to get fixed.

I would also try to run this as a command line in a terminal app and get a long (and messy) stack crawl of the error. It's going to be very hard to debug without more info...

That is trying running something this (you may have to tweak some of the parameters to get it to work):

java -cp "XXXX/Library/Application Support/Neo4j Desktop/Application/graphApps/_global/neo4j-etl-ui/dist/neo4j-etl.jar" org.neo4j.etl.NeoIntegrationCli export --mapping-file "/var/folders/3s/6q23b6y952d129mdl0jjqshc0000gn/T/postgresql_av_public_mapping.json" --rdbms:password "XXXXX" --rdbms:user "postgres" --rdbms:url "jdbc:postgresql://localhost:5432/av?ssl=false" --options-file "/var/folders/3s/6q23b6y952d129mdl0jjqshc0000gn/T/import-tool-options.json" --using "cypher:fromSQL" --unwind-batch-size 1000 --tx-batch-size 10000 --neo4j:url "bolt://localhost:7687" --neo4j:user "neo4j" --neo4j:password "XXXXX"

Also do this to find out what version of java you are running:
java -version

In the meantime, have you tried exporting to CSV and then importing? I found the Cypher code is pretty good for importing since you can do a lot with fields as you are building your nodes and/or relationships.

See:

If you do this, it really helps to set the import directory:

Neo4j Desktop -> click on three dots -> Manage -> Settings

Change:
dbms.directories.import=import
to
dbms.directories.import=ABSOLUTE_PATH_NAME

such as /Users/YOUR_USER_NAME/import

and restart the DB

Thanks for the help. It turned out to be simpler (and dumber) - I was running it on a relatively new laptop which apparently I had never installed JDK on. When I ran the import from the command line instead of from the Desktop app, it gave me a much more helpful response... :slight_smile:

I ran into similar issue with MySQL import. I checked my java version and tried with both JDK8 and JDK14, still the same problem.

I ran the command in command line and yet received the same error.

I then added verbose flags to the command which gave little additional information about the error:

JDK 14 | AdoptOpenJDK (build 14.0.2+12)

[0.246s][info][class,load] jdk.internal.module.SystemModuleFinders$SystemModuleReader$$Lambda$41/0x0000000800baa040 source: jdk.internal.module.SystemModuleFinders$SystemModuleReader
- Illegal command (NullPointerException: null)

JDK 8 | AdoptOpenJDK(build 1.8.0_272-b10)

[Loaded java.util.ResourceBundle$Control$1 from /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/rt.jar]
- Illegal command (NullPointerException: null)

Still no clue what it is thought it looks like a java error, am not fully convinced that it is because

  • A different command of the same jar works fine
    java -cp neo4j-etl.jar org.neo4j.etl.NeoIntegrationCli generate-metadata-mapping
  • All my other applications are working fine

My problem turned out to be Empty password for MySql.

After setting password to my MySql instance, I ran into few other issues and the below settings helped me:
useSSL=false
allowPublicKeyRetrieval=tru