jexp / batch-import

generic csv file neo4j batch importer
https://neo4j.com/docs/operations-manual/current/tools/import/
385 stars 158 forks source link

NumberFormatException when importing rels.csv #92

Closed drstarry closed 10 years ago

drstarry commented 10 years ago

Hi @jexp , I am totally new user of batch-import. I have an import error when importing rels. My nodes have been successfully imported as follow: "Using Existing Configuration File Importing 100 Nodes took 0 seconds Importing 160 Nodes took 0 seconds " But my rels.csv counted trouble of "Exception in thread "main" java.lang.NumberFormatException: For input string: "444842 2 1 AUTHOR_OF" " The string is my first line of rels.csv and I have the correct format of my csv. I don't know what happened even if I read the source code where throws an exception. Hope you can help me. Thank you !

drstarry commented 10 years ago

Hi @jexp , This is where I got error,I don't know what does it mean.

Exception in thread "main" java.lang.NumberFormatException: For input string: "444842 2 1 AUTHOR_OF" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.valueOf(Unknown Source) at org.neo4j.batchimport.importer.Type$4.convert(Type.java:29) at org.neo4j.batchimport.importer.CsvLineData.readLine(CsvLineData.java:35) at org.neo4j.batchimport.importer.AbstractLineData.parse(AbstractLineData.java:130) at org.neo4j.batchimport.importer.AbstractLineData.processLine(AbstractLineData.java:70) at org.neo4j.batchimport.Importer.importRelationships(Importer.java:127) at org.neo4j.batchimport.Importer.doImport(Importer.java:214) at org.neo4j.batchimport.Importer.main(Importer.java:78)

drstarry commented 10 years ago

HI @jexp , After I changed my type of index from int to string, the exception changed as followed.

"Using Existing Configuration File Importing 100 Nodes took 0 seconds Importing 160 Nodes took 0 seconds Total import time: 0 seconds Exception in thread "main" java.lang.NullPointerException at org.neo4j.batchimport.Importer.lookup(Importer.java:111) at org.neo4j.batchimport.Importer.id(Importer.java:165) at org.neo4j.batchimport.Importer.importRelationships(Importer.java:129) at org.neo4j.batchimport.Importer.doImport(Importer.java:214) at org.neo4j.batchimport.Importer.main(Importer.java:78)"

Is there any wrong with my index sid:string:XXX ?