我正在编写一个简单的程序,我将我的GTFS文件上传到Neo4j Spatial。
我认为这是一些配置错误或Neo4j空间库的一些问题,这就是为什么我没有上传我的代码,这是非常基本的here:
我导入了所有必需的neo4j库:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.2.8</version>
</dependency>
<dependency>
<artifactId>neo4j-spatial</artifactId>
<groupId>org.neo4j</groupId>
<version>0.25.4-neo4j-3.2.8</version>
</dependency>
尽管添加了所有这些neo4j库,但我收到了查询引擎未找到的错误,所以我决定添加以下内容:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher</artifactId>
<version>2.2.0</version>
</dependency>
但现在我得到一个非常奇怪的错误:
Exception in thread "main" org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.kernel.GraphDatabaseQueryService
看到它时完成错误
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Agency
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.ShapePoint
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Route
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Stop
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Trip
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.StopTime
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.ServiceCalendar
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.ServiceCalendarDate
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.FareAttribute
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.FareRule
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Frequency
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Pathway
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Transfer
main INFO serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.FeedInfo
Exception in thread "main" org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.kernel.GraphDatabaseQueryService
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:73)
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:68)
at org.neo4j.graphdb.DependencyResolver$Adapter.resolveDependency(DependencyResolver.java:101)
at org.neo4j.kernel.impl.factory.ClassicCoreSPI.queryService(ClassicCoreSPI.java:143)
at org.neo4j.function.Suppliers$1.get(Suppliers.java:72)
at org.neo4j.kernel.impl.query.Neo4jTransactionalContextFactory.lambda$create$0(Neo4jTransactionalContextFactory.java:53)
at org.neo4j.kernel.impl.query.Neo4jTransactionalContextFactory.newContext(Neo4jTransactionalContextFactory.java:113)
at org.neo4j.kernel.impl.query.Neo4jTransactionalContextFactory.newContext(Neo4jTransactionalContextFactory.java:38)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.execute(GraphDatabaseFacade.java:429)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.execute(GraphDatabaseFacade.java:413)
at org.neo4j.gis.spatial.utilities.ReferenceNodes.getReferenceNode(ReferenceNodes.java:32)
at org.neo4j.gis.spatial.SpatialDatabaseService.getSpatialRoot(SpatialDatabaseService.java:77)
at org.neo4j.gis.spatial.SpatialDatabaseService.getLayer(SpatialDatabaseService.java:113)
at org.neo4j.gis.spatial.SpatialDatabaseService.containsLayer(SpatialDatabaseService.java:277)
at integrations.GTFS2Neo4jImporter.execute(GTFS2Neo4jImporter.java:50)
at api.AdminApi.uploadGTFSFRorRegion(AdminApi.java:38)
at api.AdminApi.main(AdminApi.java:47)