neo4j-contrib/neo4j-etl

Import data fails with Null Pointer Exception

rameshsunkara opened this issue · 1 comments

Environment and Software Versions:

  • macOS Catalina 10.15.7
  • Neo4j Desktop 1.4.9
  • Neo4j ETL 1.5.1
  • Tried both Java Versions when running from command line
    - JDK 14 | AdoptOpenJDK (build 14.0.2+12)
    - JDK 8 | AdoptOpenJDK(build 1.8.0_272-b10)

What am I trying to do ?

  • Import data from my local MySql database to Neo4j AuraDB Instance (RDBMS -> GraphDB)

Whats working and whats failing ?

Success

  • ETL Tool connects to local MySql DB and identifies all the tables and saves the mapping

Failure

  • Importing data into Neo4j fails with cryptic Null Pointer Exception

Error

COMMAND: java -cp "/Users/rsunkara/Library/Application Support/Neo4j Desktop/Application/graphApps/_global/neo4j-etl-ui/dist/neo4j-etl.jar" org.neo4j.etl.NeoIntegrationCli export --mapping-file "/var/folders/cq/qnvnx01j4vlc2yffms5hlvkc0000gn/T/mysql__mapping.json" --rdbms:password "mypassword" --rdbms:user "userwithrootaccess" --rdbms:url "jdbc:mysql://localhost:3306/?autoReconnect=true&useSSL=false&useCursorFetch=true&allowPublicKeyRetrieval=true&serverTimezone=UTC" --options-file "/var/folders/cq/qnvnx01j4vlc2yffms5hlvkc0000gn/T/import-tool-options.json" --using "cypher:fromSQL" --unwind-batch-size 1000 --tx-batch-size 10000 --neo4j:url "neo4j+s://replacewithrealdb.databases.neo4j.io:7687" --neo4j:user "%replace with real username%" --neo4j:password "%replaced this with real password%"
- Illegal command (NullPointerException: null)

What have I done so far to trouble shoot ?

  • Ran the ETL tools export command from Terminal instead of UI (Resulted in same failure)
  • Switched to different JDK Versions namely 8 and 14 and still resulted in same failure as some pointed out it can be a JDK issue on Neo4j forum.
  • Ran the ETL command in terminal with verbose flag and able to print some errors

While using 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)

While using 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)
  • The free AuraDB had some limits on no.of nodes and relations we can create, so reduced my data set size to mere 100s. (Still didn't helped)

Still no clue what it is, though it looks like a java error, am not fully convinced 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 which uses Java are working fine

Empty MySql password caused the above error. Setting password to my local MySql DB helped.

https://issueexplorer.com/issue/neo4j-contrib/neo4j-etl/82

I am seeing different errors now but closing this issue for now.