我尝试使用此行
GeoPipeline pipeline = GeoPipeline.start( layer )
.copyDatabaseRecordProperties( "name" )
.propertyFilter( "name", "Storgatan" );
但是它在.propertyFilter()
的行中引发了这个异常 Exception in thread "main" java.lang.NoClassDefFoundError: com/tinkerpop/pipes/filter/FilterPipe$Filter
at org.neo4j.gis.spatial.pipes.filtering.FilterProperty.<init>(FilterProperty.java:39)
at org.neo4j.gis.spatial.pipes.GeoPipeline.propertyFilter(GeoPipeline.java:708)
at foo.App.test(App.java:223)
at foo.App.main(App.java:282)
Caused by: java.lang.ClassNotFoundException: com.tinkerpop.pipes.filter.FilterPipe$Filter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more
我正在使用neo4j-spatial 1.9.5和相同的neo4j
有谁知道这个问题是什么?
答案 0 :(得分:0)
您的类路径似乎需要Tinkerpop堆栈。如果你正在使用maven,请使用:
<dependency>
<groupId>com.tinkerpop</groupId>
<artifactId>pipes</artifactId>
<version>2.4.0</version>
</dependency>
如果您需要Neo4j的蓝图API,请使用以下命令:
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-neo4j-graph</artifactId>
<version>2.4.0</version>
</dependency>