Re: [Neo4j] import OSM to Neo4j database

733 views
Skip to first unread message

Craig Taverner

unread,
Dec 2, 2012, 1:15:56 PM12/2/12
to ne...@googlegroups.com
The problem is almost certainly that the maintainer of neo4j-spatial.rb (me) has not updated it to the newer releases of neo4j. So this is a dependency issue. Since neo4j-spatial.rb depends on neo4j.rb, which is being regularly updated, things can easily get out of sync.

I will try look at this later in the week, and bring neo4j-spatial.rb up to date. But I should also say that neo4j-spatial is really just a thin wrapper on neo4j.rb and the Java API for neo4j-spatial, so there are two alternatives for you to try if you are in a rush (or I am delayed):
  • Just use neo4j.rb by itself, and then add the neo4j-spatial jar (or classes) to the java classpath for you app, and use JRuby bindings to access neo4j-spatial Java API. Using this approach, you would really be refering to the Java API for guidance (Java test cases), and just have Ruby for convenience.
  • Write in Java. The Java API for neo4j-spatial is by far the richest, with the other API's falling somewhat behind.


On Sun, Dec 2, 2012 at 1:23 PM, Mihes Hawai <mihe...@gmail.com> wrote:

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'

 

--
 
 

Mihes Hawai

unread,
Dec 2, 2012, 4:08:06 PM12/2/12
to ne...@googlegroups.com
Thank you for reply!


and have made updates until  actual version of neo4j

#!/bin/bash


cd spatial
mvn -Dmaven.test.skip=true install
cd ..

cd graph-collections
mvn -Dmaven.test.skip=true install
cd ..

cd neo4j-community-1.9.M01
mvn -Dmaven.test.skip=true install
cd ..

#unzip geotools.zip

CLASSPATH=`pwd`/spatial/target/neo4j-spatial-0.10-SNAPSHOT.jar
for f in geotools*/*.jar
do
    CLASSPATH=$CLASSPATH:`pwd`/"$f"
done

for file in neo4j-community-1.9.M01/lib/*.jar
do
    CLASSPATH=$CLASSPATH:`pwd`/"$file"
done
export CLASSPATH


javac SpatialOsmImport.java


but still have

mihes3dfxs:neo4j-spatial-starters mihes3dfx$ javac SpatialOsmImport.java 
SpatialOsmImport.java:1: error: package org.neo4j.gis.spatial.osm does not exist
import org.neo4j.gis.spatial.osm.OSMImporter;
                                ^
SpatialOsmImport.java:2: error: package org.neo4j.kernel.impl.batchinsert does not exist
import org.neo4j.kernel.impl.batchinsert.BatchInserter;
                                        ^
SpatialOsmImport.java:3: error: package org.neo4j.kernel.impl.batchinsert does not exist
import org.neo4j.kernel.impl.batchinsert.BatchInserterImpl;
                                        ^
SpatialOsmImport.java:5: error: package org.neo4j.graphdb does not exist
import org.neo4j.graphdb.GraphDatabaseService;
                        ^
SpatialOsmImport.java:6: error: package org.neo4j.kernel does not exist
import org.neo4j.kernel.EmbeddedGraphDatabase;
                       ^
SpatialOsmImport.java:11: error: cannot find symbol
    OSMImporter importer = new OSMImporter("Karlsruhe");
    ^
  symbol:   class OSMImporter
  location: class SpatialOsmImport
SpatialOsmImport.java:11: error: cannot find symbol
    OSMImporter importer = new OSMImporter("Karlsruhe");
                               ^
  symbol:   class OSMImporter
  location: class SpatialOsmImport
SpatialOsmImport.java:12: error: cannot find symbol
    BatchInserter batchinserter = new BatchInserterImpl("map.osm");
    ^
  symbol:   class BatchInserter
  location: class SpatialOsmImport
SpatialOsmImport.java:12: error: cannot find symbol
    BatchInserter batchinserter = new BatchInserterImpl("map.osm");
                                      ^
  symbol:   class BatchInserterImpl
  location: class SpatialOsmImport
SpatialOsmImport.java:15: error: cannot find symbol
      GraphDatabaseService db = new EmbeddedGraphDatabase("map.osm");
      ^
  symbol:   class GraphDatabaseService
  location: class SpatialOsmImport
SpatialOsmImport.java:15: error: cannot find symbol
      GraphDatabaseService db = new EmbeddedGraphDatabase("map.osm");
                                    ^
  symbol:   class EmbeddedGraphDatabase
  location: class SpatialOsmImport
11 errors


how can i collect all packets for SpatialOsmImport.java  ?




воскресенье, 2 декабря 2012 г., 19:15:56 UTC+1 пользователь Craig Taverner написал:

Peter Neubauer

unread,
Dec 3, 2012, 7:47:42 AM12/3/12
to Neo4j User
Mihes,
can you run the class within the mvn classpath, something like


mvn clean compile exec:java -Dexec.mainClass="SpatialOsmImport"
-Dexec.args="test.osm target/osm-db one-street.osm"

?

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html
> --
>
>

Mihes Hawai

unread,
Dec 3, 2012, 8:03:36 AM12/3/12
to ne...@googlegroups.com
so

for:
mvn clean compile exec:java -Dexec.mainClass="SpatialOsmImport"

result:  
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:

Peter Neubauer

unread,
Dec 3, 2012, 10:24:48 AM12/3/12
to Neo4j User
Oh,
this is supposed to run inside a dir where you have the neo4j spatial
code. Do first a

git clone git://github.com/neo4j/spatial.git
cd spatial
mvn clean compile exec:java -Dexec.mainClass="SpatialOsmImport"

HTH

/peter

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


> --
>
>
Message has been deleted

Peter Neubauer

unread,
Dec 3, 2012, 3:50:57 PM12/3/12
to Neo4j User
What JDK are you building with?

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


On Mon, Dec 3, 2012 at 7:31 PM, Mihes Hawai <mihe...@gmail.com> wrote:
> sorry :)
>
> mvn clean compile exec:java -Dexec.mainClass="SpatialOsmImport"
> [INFO] Scanning for projects...
> [WARNING] The POM for cuke4duke:cuke4duke-maven-plugin:jar:0.4.4 is missing,
> no dependency information available
> [WARNING] Failed to retrieve plugin descriptor for
> cuke4duke:cuke4duke-maven-plugin:0.4.4: Plugin
> cuke4duke:cuke4duke-maven-plugin:0.4.4 or one of its dependencies could not
> be resolved: Failed to read artifact descriptor for
> cuke4duke:cuke4duke-maven-plugin:jar:0.4.4
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Neo4j - Spatial Components 0.10-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [WARNING] The POM for cuke4duke:cuke4duke-maven-plugin:jar:0.4.4 is missing,
> no dependency information available
> [WARNING] Failed to retrieve plugin descriptor for
> cuke4duke:cuke4duke-maven-plugin:0.4.4: Plugin
> cuke4duke:cuke4duke-maven-plugin:0.4.4 or one of its dependencies could not
> be resolved: Failed to read artifact descriptor for
> cuke4duke:cuke4duke-maven-plugin:jar:0.4.4
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ neo4j-spatial
> ---
> [INFO]
> [INFO] --- license-maven-plugin:3:check (check-licenses) @ neo4j-spatial ---
> [INFO] Checking licenses...
> [INFO]
> [INFO] --- maven-dependency-plugin:2.4:unpack-dependencies (get-test-data) @
> neo4j-spatial ---
> [INFO] Unpacking
> /Users/mihes3dfx/.m2/repository/org/neo4j/spatial/osm-test-data/20100819/osm-test-data-20100819.jar
> to /Users/mihes3dfx/programm/webeng/spatial/target with includes "" and
> excludes ""
> [INFO] Unpacking
> /Users/mihes3dfx/.m2/repository/org/neo4j/spatial/shp-test-data/20100819/shp-test-data-20100819.jar
> to /Users/mihes3dfx/programm/webeng/spatial/target with includes "" and
> excludes ""
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @
> neo4j-spatial ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 18 resources
> [INFO] Copying 4 resources to META-INF
> [INFO] Copying 4 resources to META-INF
> [INFO]
> [INFO] --- maven-dependency-plugin:2.4:copy-dependencies (copy-dependencies)
> @ neo4j-spatial ---
> [INFO] Copying jt-zonalstats-1.2.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jt-zonalstats-1.2.0.jar
> [INFO] Copying neo4j-udc-1.8-neo4j.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-udc-1.8-neo4j.jar
> [INFO] Copying jt-utils-1.2.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jt-utils-1.2.0.jar
> [INFO] Copying neo4j-udc-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-udc-1.8.jar
> [INFO] Copying hamcrest-core-1.1.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/hamcrest-core-1.1.jar
> [INFO] Copying shp-test-data-20100819.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/shp-test-data-20100819.jar
> [INFO] Copying json-simple-1.1.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/json-simple-1.1.jar
> [INFO] Copying neo4j-jmx-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-jmx-1.8.jar
> [INFO] Copying jts-1.12.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jts-1.12.jar
> [INFO] Copying commons-lang-2.4.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/commons-lang-2.4.jar
> [INFO] Copying osm-test-data-20100819.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/osm-test-data-20100819.jar
> [INFO] Copying gt-opengis-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-opengis-8.0.jar
> [INFO] Copying jgridshift-1.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jgridshift-1.0.jar
> [INFO] Copying neo4j-examples-1.8-tests.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-examples-1.8-tests.jar
> [INFO] Copying jai_imageio-1.1.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jai_imageio-1.1.jar
> [INFO] Copying neo4j-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-1.8.jar
> [INFO] Copying gt-process-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-process-8.0.jar
> [INFO] Copying geronimo-jta_1.1_spec-1.1.1.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/geronimo-jta_1.1_spec-1.1.1.jar
> [INFO] Copying hsqldb-2.2.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/hsqldb-2.2.8.jar
> [INFO] Copying imageio-ext-utilities-1.1.4.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/imageio-ext-utilities-1.1.4.jar
> [INFO] Copying gt-coverage-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-coverage-8.0.jar
> [INFO] Copying junit-4.10.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/junit-4.10.jar
> [INFO] Copying vecmath-1.3.2.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/vecmath-1.3.2.jar
> [INFO] Copying gt-shapefile-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-shapefile-8.0.jar
> [INFO] Copying neo4j-server-1.8-tests.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-server-1.8-tests.jar
> [INFO] Copying neo4j-lucene-index-1.8.RC1.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-lucene-index-1.8.RC1.jar
> [INFO] Copying neo4j-graph-algo-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-graph-algo-1.8.jar
> [INFO] Copying neo4j-graph-matching-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-graph-matching-1.8.jar
> [INFO] Copying gt-data-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-data-8.0.jar
> [INFO] Copying lucene-core-3.5.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/lucene-core-3.5.0.jar
> [INFO] Copying jai_codec-1.1.3.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jai_codec-1.1.3.jar
> [INFO] Copying gt-main-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-main-8.0.jar
> [INFO] Copying jsr-275-1.0-beta-2.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jsr-275-1.0-beta-2.jar
> [INFO] Copying commons-pool-1.5.4.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/commons-pool-1.5.4.jar
> [INFO] Copying gt-render-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-render-8.0.jar
> [INFO] Copying neo4j-graph-collections-0.4.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-graph-collections-0.4.jar
> [INFO] Copying imageio-ext-tiff-1.1.4.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/imageio-ext-tiff-1.1.4.jar
> [INFO] Copying jdom-1.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jdom-1.0.jar
> [INFO] Copying neo4j-kernel-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-kernel-1.8.jar
> [INFO] Copying gt-api-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-api-8.0.jar
> [INFO] Copying xercesImpl-2.4.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/xercesImpl-2.4.0.jar
> [INFO] Copying gt-referencing-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-referencing-8.0.jar
> [INFO] Copying jai_core-1.1.3.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/jai_core-1.1.3.jar
> [INFO] Copying gt-metadata-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-metadata-8.0.jar
> [INFO] Copying scala-library-2.9.1-1.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/scala-library-2.9.1-1.jar
> [INFO] Copying neo4j-cypher-1.8.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/neo4j-cypher-1.8.jar
> [INFO] Copying gt-cql-8.0.jar to
> /Users/mihes3dfx/programm/webeng/spatial/target/dependency/gt-cql-8.0.jar
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> neo4j-spatial ---
> [INFO] Compiling 130 source files to
> /Users/mihes3dfx/programm/webeng/spatial/target/classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[56,56]
> error: interface expected here
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java:[313,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java:[348,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java:[354,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java:[1004,60]
> error: cannot find symbol
> [ERROR] class AbstractGraphDatabase
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[40,7]
> error: SpatialIndexProvider is not abstract and does not override abstract
> method load(KernelData) in IndexProvider
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[53,15]
> error: incompatible types
> [ERROR] SpatialIndexProvider.SpatialIndexImplementation
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[51,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[65,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[70,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[75,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[80,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[85,8]
> error: method does not override or implement a method from a supertype
> [INFO] 13 errors
> [INFO] -------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 9.355s
> [INFO] Finished at: Mon Dec 03 19:27:02 CET 2012
> [INFO] Final Memory: 37M/335M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
> (default-compile) on project neo4j-spatial: Compilation failure: Compilation
> failure:
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[56,56]
> error: interface expected here
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java:[313,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java:[348,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java:[354,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java:[1004,60]
> error: cannot find symbol
> [ERROR] class AbstractGraphDatabase
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[40,7]
> error: SpatialIndexProvider is not abstract and does not override abstract
> method load(KernelData) in IndexProvider
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[53,15]
> error: incompatible types
> [ERROR] SpatialIndexProvider.SpatialIndexImplementation
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[51,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[65,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[70,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[75,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[80,8]
> error: method does not override or implement a method from a supertype
> [ERROR]
> /Users/mihes3dfx/programm/webeng/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[85,8]
> error: method does not override or implement a method from a supertype
> [ERROR] -> [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/MojoFailureException
>
> --
>
>

Mihes Hawai

unread,
Dec 3, 2012, 3:53:18 PM12/3/12
to ne...@googlegroups.com
jdk1.7.0_10

Mihes Hawai

unread,
Dec 3, 2012, 4:13:32 PM12/3/12
to ne...@googlegroups.com

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... 

Lasse Westh-Nielsen

unread,
Dec 4, 2012, 4:04:51 AM12/4/12
to ne...@googlegroups.com
Mihes,

Please use JDK6, it is the one we officially support.

Also, cuke4duke seems to have vanished from Maven Central recently, so
you need to obtain a copy of that from somewhere (e.g. build it
yourself from https://github.com/cucumber/cuke4duke) (and note to
self: we need to get rid of that dependency asap)

- Lasse
> --
>
>

Peter Neubauer

unread,
Dec 4, 2012, 8:15:18 AM12/4/12
to Neo4j User
I think that is already gone from
https://github.com/neo4j/spatial/blob/master/pom.xml ?

Mikhail, can you zip and share the exact directory where you are
compiling neo4j-spatial?

/peter

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


> --
>
>

Craig Taverner

unread,
Dec 4, 2012, 11:17:31 AM12/4/12
to ne...@googlegroups.com
Also, there is no need for the SpatialOSMImport class and project at https://github.com/neo4j-india/neo4j-spatial-starters.

This appears to be a duplicate of code that already exists inside neo4j-spatial itself. See https://github.com/neo4j/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java#L2210

So, if you run the main method of OSMImporter, you can also import OSM files on the command-line.


--



Mihes Hawai

unread,
Dec 4, 2012, 1:36:40 PM12/4/12
to ne...@googlegroups.com
i try to work with OSMImporter.java from neo4j-saptial
i downloaded all  jar files

but still ... 1 error  ..
osm mihes3dfx$ javac OSMImporter.java
OSMImporter.java:1004: cannot find symbol
symbol  : method tx()
location: class org.neo4j.kernel.AbstractGraphDatabase
                    tx = ( (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

Mihes Hawai

unread,
Dec 4, 2012, 1:45:14 PM12/4/12
to ne...@googlegroups.com
osm mihes3dfx$ javac -Xlint OSMImporter.java
OSMImporter.java:1004: cannot find symbol
symbol  : method tx()
location: class org.neo4j.kernel.AbstractGraphDatabase
                    tx = ( (AbstractGraphDatabase) graphDb ).tx().unforced().begin();
                                                            ^
OSMImporter.java:1736: warning: [unchecked] unchecked conversion
found   : java.util.Map
required: java.util.Map<java.lang.String,java.lang.Object>
                            usersNode = batchInserter.createNode( MapUtils.EMPTY_MAP );
                                                                          ^
1 error
1 warning

Craig Taverner

unread,
Dec 5, 2012, 5:30:54 AM12/5/12
to ne...@googlegroups.com
I still think you are having a problem with dependencies. So I gave this a try, in two ways, one was Peters suggestion of using the maven 'exec:java' approach, and the other was to use the java command directly. Both worked fine. Here are the commands I used to do this completely:

setup:
cd spatial
mvn clean install

Run using JAVA command:
mvn dependency:copy-dependencies
java -cp target/classes:target/dependency/* org.neo4j.gis.spatial.osm.OSMImporter osm-db two-street.osm 

Run using 'mvn exec:java':
mvn exec:java -Dexec.mainClass=org.neo4j.gis.spatial.osm.OSMImporter -Dexec.args="osm-db two-street.osm"

Note that the OSMImporter cannot re-import the same data, so you need to delete the database between runs if you are planning to do that.

--
 
 

Craig Taverner

unread,
Dec 5, 2012, 5:45:14 AM12/5/12
to ne...@googlegroups.com
I thought it possible this question might come up again, so I added these instructions to the README. See https://github.com/neo4j/spatial#running-neo4j-spatial-code-from-the-command-line

Peter Neubauer

unread,
Dec 5, 2012, 10:24:57 AM12/5/12
to Neo4j User

Great Craig, good thinking.

/peter

Sent from mobile device.

--
 
 

Mihes Hawai

unread,
Dec 5, 2012, 10:30:46 AM12/5/12
to ne...@googlegroups.com
thank you so much!!!!!
Reply all
Reply to author
Forward
0 new messages