Please help me :)
2 days i try import osm data to neo4j database :)
java 7u10
when i use this https://gist.github.com/3729169 code, where can i find follow classes:
import org.neo4j.gis.spatial.osm.OSMImporter;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.kernel.EmbeddedGraphDatabase;
import org.neo4j.kernel.impl.batchinsert.BatchInserter;
import org.neo4j.kernel.impl.batchinsert.BatchInserterImpl
when i tried to do this with neo4j-spatial.rb :
(jruby1.7)
$ osm_import map.osm
I, [2012-12-02T12:50:46.302000 #21790] INFO -- : Starting local Neo4j using db /Users/mihes3dfx/programm/webeng/jruby/neo4j-spatial.rb-master/examples/db using Java::OrgNeo4jKernel::EmbeddedGraphDatabase
LifeSupport.java:388:in `init': org.neo4j.kernel.lifecycle.LifecycleException: Failed to transition org.neo4j.kernel.InternalAbstractGraphDatabase$DefaultKernelExtensionLoader@2a004f83 from NONE to STOPPED
from LifeSupport.java:82:in `init'
from LifeSupport.java:116:in `start'
from InternalAbstractGraphDatabase.java:227:in `run'
from EmbeddedGraphDatabase.java:79:in `<init>'
from EmbeddedGraphDatabase.java:70:in `<init>'
from NativeConstructorAccessorImpl.java:-2:in `newInstance0'
from NativeConstructorAccessorImpl.java:57:in `newInstance'
from DelegatingConstructorAccessorImpl.java:45:in `newInstance'
from Constructor.java:525:in `newInstance'
from JavaConstructor.java:291:in `newInstanceDirect'
from ConstructorInvoker.java:104:in `call'
from ConstructorInvoker.java:197:in `call'
from CachingCallSite.java:356:in `cacheAndCall'
from CachingCallSite.java:213:in `callBlock'
from CachingCallSite.java:217:in `call'
from ConcreteJavaProxy.java:56:in `call'
from CachingCallSite.java:356:in `cacheAndCall'
from CachingCallSite.java:213:in `callBlock'
from CachingCallSite.java:217:in `call'
from RubyClass.java:874:in `newInstance'
from RubyClass$INVOKER$i$newInstance.gen:-1:in `call'
from JavaMethod.java:291:in `call'
from ConcreteJavaProxy.java:155:in `call'
from CachingCallSite.java:346:in `cacheAndCall'
from CachingCallSite.java:204:in `call'
from CallTwoArgNode.java:59:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from IfNode.java:118:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from RescueNode.java:228:in `executeBody'
from RescueNode.java:123:in `interpretWithJavaExceptions'
from RescueNode.java:113:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from NewlineNode.java:105:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from OpAsgnOrNode.java:102:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:182:in `call'
from DefaultMethod.java:192:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:105:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:161:in `call'
from DefaultMethod.java:184:in `call'
from CachingCallSite.java:316:in `cacheAndCall'
from CachingCallSite.java:145:in `callBlock'
from CachingCallSite.java:149:in `call'
from RubyClass.java:860:in `newInstance'
from RubyClass$INVOKER$i$newInstance.gen:-1:in `call'
from JavaMethod.java:257:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from NewlineNode.java:105:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:96:in `INTERPRET_EVAL'
from ASTInterpreter.java:175:in `evalWithBinding'
from RubyKernel.java:1102:in `evalCommon'
from RubyKernel.java:1065:in `eval19'
from RubyKernel$INVOKER$s$0$3$eval19.gen:-1:in `call'
from DynamicMethod.java:208:in `call'
from DynamicMethod.java:204:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from FCallOneArgNode.java:36:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:120:in `INTERPRET_ROOT'
from Ruby.java:797:in `runInterpreter'
from Ruby.java:2576:in `loadFile'
from ExternalScript.java:66:in `load'
from LoadService.java:329:in `load'
from RubyKernel.java:1053:in `loadCommon'
from RubyKernel.java:1045:in `load19'
from RubyKernel$INVOKER$s$0$1$load19.gen:-1:in `call'
from DynamicMethod.java:208:in `call'
from DynamicMethod.java:204:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:96:in `INTERPRET_EVAL'
from ASTInterpreter.java:175:in `evalWithBinding'
from RubyKernel.java:1102:in `evalCommon'
from RubyKernel.java:1065:in `eval19'
from RubyKernel$INVOKER$s$0$3$eval19.gen:-1:in `call'
from DynamicMethod.java:224:in `call'
from DynamicMethod.java:220:in `call'
from CachingCallSite.java:366:in `cacheAndCall'
from CachingCallSite.java:238:in `call'
from /Users/mihes3dfx/.rvm/gems/jruby-1.7.0@neo4j/bin/ruby_noexec_wrapper:14:in `__file__'
from /Users/mihes3dfx/.rvm/gems/jruby-1.7.0@neo4j/bin/ruby_noexec_wrapper:-1:in `load'
from Ruby.java:770:in `runScript'
from Ruby.java:763:in `runScript'
from Ruby.java:640:in `runNormally'
from Ruby.java:489:in `runFromMain'
from Main.java:375:in `doRunFromMain'
from Main.java:264:in `internalRun'
from Main.java:230:in `run'
from Main.java:214:in `run'
from Main.java:194:in `main'
Caused by:
InternalAbstractGraphDatabase.java:1171:in `loadIndexImplementations': java.lang.AbstractMethodError
from InternalAbstractGraphDatabase.java:1143:in `init'
from LifeSupport.java:382:in `init'
from LifeSupport.java:82:in `init'
from LifeSupport.java:116:in `start'
from InternalAbstractGraphDatabase.java:227:in `run'
from EmbeddedGraphDatabase.java:79:in `<init>'
from EmbeddedGraphDatabase.java:70:in `<init>'
from NativeConstructorAccessorImpl.java:-2:in `newInstance0'
from NativeConstructorAccessorImpl.java:57:in `newInstance'
from DelegatingConstructorAccessorImpl.java:45:in `newInstance'
from Constructor.java:525:in `newInstance'
from JavaConstructor.java:291:in `newInstanceDirect'
from ConstructorInvoker.java:104:in `call'
from ConstructorInvoker.java:197:in `call'
from CachingCallSite.java:356:in `cacheAndCall'
from CachingCallSite.java:213:in `callBlock'
from CachingCallSite.java:217:in `call'
from ConcreteJavaProxy.java:56:in `call'
from CachingCallSite.java:356:in `cacheAndCall'
from CachingCallSite.java:213:in `callBlock'
from CachingCallSite.java:217:in `call'
from RubyClass.java:874:in `newInstance'
from RubyClass$INVOKER$i$newInstance.gen:-1:in `call'
from JavaMethod.java:291:in `call'
from ConcreteJavaProxy.java:155:in `call'
from CachingCallSite.java:346:in `cacheAndCall'
from CachingCallSite.java:204:in `call'
from CallTwoArgNode.java:59:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from IfNode.java:118:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from RescueNode.java:228:in `executeBody'
from RescueNode.java:123:in `interpretWithJavaExceptions'
from RescueNode.java:113:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from NewlineNode.java:105:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from IfNode.java:118:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from OpAsgnOrNode.java:102:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:176:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:182:in `call'
from DefaultMethod.java:192:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:105:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:161:in `call'
from DefaultMethod.java:184:in `call'
from CachingCallSite.java:316:in `cacheAndCall'
from CachingCallSite.java:145:in `callBlock'
from CachingCallSite.java:149:in `call'
from RubyClass.java:860:in `newInstance'
from RubyClass$INVOKER$i$newInstance.gen:-1:in `call'
from JavaMethod.java:257:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from NewlineNode.java:105:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:96:in `INTERPRET_EVAL'
from ASTInterpreter.java:175:in `evalWithBinding'
from RubyKernel.java:1102:in `evalCommon'
from RubyKernel.java:1065:in `eval19'
from RubyKernel$INVOKER$s$0$3$eval19.gen:-1:in `call'
from DynamicMethod.java:208:in `call'
from DynamicMethod.java:204:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from FCallOneArgNode.java:36:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:120:in `INTERPRET_ROOT'
from Ruby.java:797:in `runInterpreter'
from Ruby.java:2576:in `loadFile'
from ExternalScript.java:66:in `load'
from LoadService.java:329:in `load'
from RubyKernel.java:1053:in `loadCommon'
from RubyKernel.java:1045:in `load19'
from RubyKernel$INVOKER$s$0$1$load19.gen:-1:in `call'
from DynamicMethod.java:208:in `call'
from DynamicMethod.java:204:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:96:in `INTERPRET_EVAL'
from ASTInterpreter.java:175:in `evalWithBinding'
from RubyKernel.java:1102:in `evalCommon'
from RubyKernel.java:1065:in `eval19'
from RubyKernel$INVOKER$s$0$3$eval19.gen:-1:in `call'
from DynamicMethod.java:224:in `call'
from DynamicMethod.java:220:in `call'
from CachingCallSite.java:366:in `cacheAndCall'
from CachingCallSite.java:238:in `call'
from /Users/mihes3dfx/.rvm/gems/jruby-1.7.0@neo4j/bin/ruby_noexec_wrapper:14:in `__file__'
from /Users/mihes3dfx/.rvm/gems/jruby-1.7.0@neo4j/bin/ruby_noexec_wrapper:-1:in `load'
from Ruby.java:770:in `runScript'
from Ruby.java:763:in `runScript'
from Ruby.java:640:in `runNormally'
from Ruby.java:489:in `runFromMain'
from Main.java:375:in `doRunFromMain'
from Main.java:264:in `internalRun'
from Main.java:230:in `run'
from Main.java:214:in `run'
from Main.java:194:in `main'
--
#!/bin/bashgit clone https://github.com/neo4j/spatial.gitcd spatialmvn -Dmaven.test.skip=true installcd ..cd graph-collectionsmvn -Dmaven.test.skip=true installcd ..cd neo4j-community-1.9.M01mvn -Dmaven.test.skip=true installcd ..#wget -O geotools.zip http://sourceforge.net/projects/geotools/files/GeoTools%208.0%20Releases/8.0-RC2/geotools-8.0-RC2-bin.zip/download#unzip geotools.zipCLASSPATH=`pwd`/spatial/target/neo4j-spatial-0.10-SNAPSHOT.jarfor f in geotools*/*.jardoCLASSPATH=$CLASSPATH:`pwd`/"$f"donefor file in neo4j-community-1.9.M01/lib/*.jardoCLASSPATH=$CLASSPATH:`pwd`/"$file"doneexport CLASSPATHjavac SpatialOsmImport.java
mihes3dfxs:neo4j-spatial-starters mihes3dfx$ javac SpatialOsmImport.javaSpatialOsmImport.java:1: error: package org.neo4j.gis.spatial.osm does not existimport org.neo4j.gis.spatial.osm.OSMImporter;^SpatialOsmImport.java:2: error: package org.neo4j.kernel.impl.batchinsert does not existimport org.neo4j.kernel.impl.batchinsert.BatchInserter;^SpatialOsmImport.java:3: error: package org.neo4j.kernel.impl.batchinsert does not existimport org.neo4j.kernel.impl.batchinsert.BatchInserterImpl;^SpatialOsmImport.java:5: error: package org.neo4j.graphdb does not existimport org.neo4j.graphdb.GraphDatabaseService;^SpatialOsmImport.java:6: error: package org.neo4j.kernel does not existimport org.neo4j.kernel.EmbeddedGraphDatabase;^SpatialOsmImport.java:11: error: cannot find symbolOSMImporter importer = new OSMImporter("Karlsruhe");^symbol: class OSMImporterlocation: class SpatialOsmImportSpatialOsmImport.java:11: error: cannot find symbolOSMImporter importer = new OSMImporter("Karlsruhe");^symbol: class OSMImporterlocation: class SpatialOsmImportSpatialOsmImport.java:12: error: cannot find symbolBatchInserter batchinserter = new BatchInserterImpl("map.osm");^symbol: class BatchInserterlocation: class SpatialOsmImportSpatialOsmImport.java:12: error: cannot find symbolBatchInserter batchinserter = new BatchInserterImpl("map.osm");^symbol: class BatchInserterImpllocation: class SpatialOsmImportSpatialOsmImport.java:15: error: cannot find symbolGraphDatabaseService db = new EmbeddedGraphDatabase("map.osm");^symbol: class GraphDatabaseServicelocation: class SpatialOsmImportSpatialOsmImport.java:15: error: cannot find symbolGraphDatabaseService db = new EmbeddedGraphDatabase("map.osm");^symbol: class EmbeddedGraphDatabaselocation: class SpatialOsmImport11 errors
mvn clean compile exec:java -Dexec.mainClass="SpatialOsmImport"
neo4j-spatial-starters mihes3dfx$ mvn clean compile exec:java -Dexec.mainClass="SpatialOsmImport"[INFO] Scanning for projects...[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 0.148s[INFO] Finished at: Mon Dec 03 14:00:55 CET 2012[INFO] Final Memory: 5M/118M[INFO] ------------------------------------------------------------------------[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/mihes3dfx/programm/webeng/jruby/neo4j-spatial-starters). Please verify you invoked Maven from the correct directory. -> [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:
mac os 10.8.2
preinstall jdk1.6 + jdk1.7.0_10 (my installation)
maven 3.0.4
https://github.com/neo4j-india/neo4j-spatial-starters
and neo4j-spatial from git repo
do need you something else?
ps. think you for patience...
--
osm mihes3dfx$ javac OSMImporter.javaOSMImporter.java:1004: cannot find symbolsymbol : method tx()location: class org.neo4j.kernel.AbstractGraphDatabasetx = ( (AbstractGraphDatabase) graphDb ).tx().unforced().begin();^Note: OSMImporter.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.Note: OSMImporter.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.1 error
osm mihes3dfx$ javac -Xlint OSMImporter.java
OSMImporter.java:1004: cannot find symbolsymbol : method tx()location: class org.neo4j.kernel.AbstractGraphDatabasetx = ( (AbstractGraphDatabase) graphDb ).tx().unforced().begin();^
OSMImporter.java:1736: warning: [unchecked] unchecked conversionfound : java.util.Maprequired: java.util.Map<java.lang.String,java.lang.Object>usersNode = batchInserter.createNode( MapUtils.EMPTY_MAP );^1 error1 warning
--
Great Craig, good thinking.
/peter
Sent from mobile device.
--