Hi,

I am new to Neo4j Spatial and trying to play with it. I have built neo4j 
spatial by cloning the git repo and running 'mvn clean install'. In my Java 
project I am pointing to this built jar and I am trying to import 
Washington DC's OSM file using the code below:

OSMImporter importer = new OSMImporter ("WashingtonDC");
Map<String, String> config = new HashMap<String, String>();
config.put("neostore.nodestore.db.mapped_memory", "256M" );
config.put("dump_configuration", "true");
config.put("use_memory_mapped_buffers", "true");
String dir = "/dev/neo4j-spatial/db";
BatchInserter batchInserter = BatchInserters.inserter(dir,config);

importer.importFile(batchInserter, "/downloads/dc-baltimore.osm",false);
batchInserter.shutdown();

GraphDatabaseService db = new 
GraphDatabaseFactory().newEmbeddedDatabase(dir);
importer.reIndex(db,10000);
db.shutdown();

However, upon running this example I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/geotools/referencing/datum/DefaultEllipsoid
at org.neo4j.gis.spatial.osm.OSMImporter.<clinit>(OSMImporter.java:68)
at com.paramiq.neo4j.spatial.SpatialOSMImport.main(SpatialOSMImport.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: 
org.geotools.referencing.datum.DefaultEllipsoid
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 7 more

I am guessing a dependency issue. I would appreciate any help.

Thanks
Sumit

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to