Hi,
Thanks for developing this code; am looking forward to using as I learn more about neo4j and graph.
I have an issue with automatic indexing I am hoping you can assist with.
For the fundamental example using nodes.csv and rels.csv in the Github documentation it all works really well; no problem.
However when I try to do the automatic indexing I get an error.
Here are the steps I took:
- Edited batch.properties and added line "batch_import.node_index.users=exact" (not quotes).
- Used the following nodes.csv.
name:string:users age works_on
Michael 37 neo4j
Selina 14
Rana 6
Selma 4
- Used the following rels.csv
start:string:users end:string:users type since counter:int
Michael Selina FATHER_OF 1998-07-10 1
Michael Rana FATHER_OF 2007-09-15 2
Michael Selma FATHER_OF 2008-05-03 3
Rana Selma SISTER_OF 2008-05-03 5
Selina Rana SISTER_OF 2007-09-15 7
- Ran the following command.
mvn clean compile exec:java -Dexec.mainClass="org.neo4j.batchimport.Importer" -Dexec.args="neo4j/data/graph.db nodes.csv rels.csv"
- Here is the output:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Neo4j Batch Importer 1.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ batch-import ---
[INFO] Deleting /home/user/batch-import/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ batch-import ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.1:compile (default-compile) @ batch-import ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 51 source files to /home/user/batch-import/target/classes
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ batch-import >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ batch-import <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ batch-import ---
Usage java -jar batchimport.jar data/dir nodes.csv relationships.csv [node_index node-index-name fulltext|exact nodes_index.csv rel_index rel-index-name fulltext|exact rels_index.csv ....]
Using Existing Configuration File
Importing 5 Nodes took 0 seconds
Total import time: 0 seconds
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.neo4j.batchimport.Importer.lookup(Importer.java:100)
at org.neo4j.batchimport.Importer.id(Importer.java:139)
at org.neo4j.batchimport.Importer.importRelationships(Importer.java:115)
at org.neo4j.batchimport.Importer.doImport(Importer.java:188)
at org.neo4j.batchimport.Importer.main(Importer.java:74)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.420s
[INFO] Finished at: Fri Jul 05 08:42:27 PHT 2013
[INFO] Final Memory: 14M/51M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project batch-import: An exception occured while executing the Java class. null: InvocationTargetException: NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
- Other information
[Maven]
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800)
Maven home: /opt/apache-maven
Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
Java home: /usr/java/jdk1.6.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-358.11.1.el6.x86_64", arch: "amd64", family: "unix"
[Java]
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
I should point out this works fine for the fundamental example but not when I use automatic indexing.
Appreciate any guide on where I have gone wrong here. Let me know if you need more information to diagnose.