batch-import
batch-import copied to clipboard
NegativeArraySizeException when exporting relations
Hi, I'm having trouble importing my rels.csv file, even with the example given in the readme.md.
code compiled with
mvn clean compile assembly:single
end exectued with
java -server -Xmx4G -jar ../batch-import/target/batch-import-jar-with-dependencies.jar neo4j/data/data.db nodes.csv rels.csv
the nodes and rels files are those on the readme.md examples
I get this error
Using Existing Configuration File
Importing 5 Nodes took 0 seconds
Total import time: 0 seconds
Exception in thread "main" java.lang.NegativeArraySizeException
at org.neo4j.batchimport.importer.RowData.createMapData(RowData.java:37)
at org.neo4j.batchimport.importer.RowData.<init>(RowData.java:27)
at org.neo4j.batchimport.Importer.importRelationships(Importer.java:101)
at org.neo4j.batchimport.Importer.main(Importer.java:63)
Can you share the nodes.csv and rels.csv as a gist ?
I simply copied and pasted the nodes and rels on readme.md
but here they are https://gist.github.com/4275389
Those have to be tab separated files, I doubt that copying from a web document creates correct versions. Please check that there are only tabs in between the fields.
that may be the issue because I try to replace tabs with space usually, gonna try now
It works ! But it's pretty odd that spaces work in nodes but not in rels !! Thanks by the way :)
OK, just to clear this out a little more, the import of the nodes.csv with spaces instead of tabs was also problematic, but it didn't threw any exceptions simply because it interpreted the whole line as one string attribute, and not various attributes separated with spaces !!!
Conclusion : one must be really careful about the distinciton between spaces and tab !!!!
Yep, I highlight it more in the readme. Thanks.
Hey, I've got the same issue. Maybe you should add these files to the repository under a /sample dir?