cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Neo4j ETL tool not able to import data of Online PostgreSQL database. Data imported with errors.NullPointerException

priyankeshraj
Node Link

I am importing my online postgreSQL database into my Neo4j database using the Neo-4j ETL Tool.
I am using PgAdmin 4.30 for postgreSQL 13 and Neo4j 1.4.1.
The ETL Tool says

Connection myconn saved. Connection successful. Catalog:
mydatabase, Schema: public

Mapping successful

Mapping saved successfully

Import successful

But the problem is that only the table name is imported and no relationships and no table data are imported.
The import mode "Online direct Import from SQL" or "Bulk Import" neither works.
The import log says

COMMAND: java -cp
"C:\Users*user*.Neo4jDesktop\graphApps_global\neo4j-etl-ui/dist/neo4j-etl.jar"
org.neo4j.etl.NeoIntegrationCli export --mapping-file
"C:\Users*user*\AppData\Local\Temp/postgresql_db_mapping.json"
--rdbms:password "mydatabase" --rdbms:user "user" --rdbms:url "jdbc:postgresql://port/mydatabase?ssl=false"
--options-file "C:\Users*user*\AppData\Local\Temp/import-tool-options.json" --using
"cypher:fromSQL" --unwind-batch-size 1000 --tx-batch-size 10000
--neo4j:database-name mydb --neo4j:url "bolt://localhost:7687" --neo4j:user "user" --neo4j:password "password" LOG:

  • Reading options from file C:\Users*user*\AppData\Local\Temp\import-tool-options.json.
  • Reading metadata mapping from file: C:\Users*user*\AppData\Local\Temp/postgresql_mydb_mapping.json
  • Direct driver instance 1971764991 created for server address localhost:7687
  • Running ETL on Neo4j 4.1.0 - ENTERPRISE
  • Direct driver instance 2063763486 created for server address localhost:7687
  • Starting reading metadataMapping
  • Creating constraints on nodes
  • Creating constraint for label table1 and properties (table1)
  • Creating constraint for label table2 and properties (table2)
  • Creating constraint for label table3 and properties (table3)
  • Creating constraint for label table4 and properties (table4)
  • Creating constraint for label table5 and properties (table5)
  • Creating constraint for label table6 and properties (table6)
  • Creating constraint for label table7 and properties (table7)
  • Creating nodes with label table1
  • Creating nodes with label table2
  • Creating nodes with label table3
  • Creating nodes with label table4
  • Creating nodes with label table5
  • Creating nodes with label table6
  • Creating nodes with label table7
  • Creating relationships of type rel1
  • Creating relationships of type rel2
  • Creating relationships of type rel3
  • Creating relationships of type rel4
  • Creating relationships of type rel5
  • Creating relationships of type rel6
  • Data imported with errors. Below the list of errors.
  • For exception NullPointerException we got the following errors:
  • Process failed null
  • Closing driver instance 2063763486
  • Closing connection pool towards localhost:7687

Please help me or suggest me what to do. I don't know what to do here.
Any help will be appreciated.

1 ACCEPTED SOLUTION

No, I am using Neo4j Desktop Version 1.4.1 while the neo4j version is 4.1.0

Actually the problem had nothing to do with Neo4j. I did not had permission for a specific table in postgres, that is the reason I was not able to import the data into Neo4j.

View solution in original post

3 REPLIES 3

clem
Graph Steward

one thing... The Neo4J you are using is positively ancient. I would upgrade to the latest and (4.2.2 vs. 1.4.1 or did you really mean 4.1.0?) see if the problem goes away.

A null pointer exception is a Java error that if a programmer had thought about all possibilities, shouldn't occur (in theory).

If there was a stack trace of the Java Error, that would be more helpful to track down where code forgot to check for a null pointer.

No, I am using Neo4j Desktop Version 1.4.1 while the neo4j version is 4.1.0

Actually the problem had nothing to do with Neo4j. I did not had permission for a specific table in postgres, that is the reason I was not able to import the data into Neo4j.

Then some code should have detected the lack of permissions and not thrown a null pointer (or at least caught it.)

This is a bug on somebody's part.