当前位置: 首页 > 知识库问答 >
问题:

兼容性neo4j空间与Spring数据neo4jRest和neo4j CE 2.2.1服务器模式?

宋经赋
2023-03-14

我试图使neo4j-空间版本0.14-neo4j-2.2.0,与sping-data-neo4j-rest版本3.3.0一起工作。在服务器模式下使用neo4j CE 2.2.1发布。

看起来它们不兼容。试图创建类EditableLayer的新实例会引发NoSuchmethod异常。

例如:

EditableLayer layer = (EditableLayer) spatialDb.getOrCreateLayer( "layer",SimplePointEncoder.class, EditableLayerImpl.class);

我得到一个例外:

SEVERE: Servlet.service() for servlet [com.stampy.foundation.remote.RestConfiguration] in context with path [/stampy-server] threw exception [java.lang.RuntimeException: javax.servlet.ServletException: java.lang.NoSuchMethodError: org.neo4j.graphdb.GraphDatabaseService.execute(Ljava/lang/String;Ljava/util/Map;)Lorg/neo4j/graphdb/Result;] with root cause
java.lang.NoSuchMethodError: org.neo4j.graphdb.GraphDatabaseService.execute(Ljava/lang/String;Ljava/util/Map;)Lorg/neo4j/graphdb/Result;
    at org.neo4j.gis.spatial.utilities.ReferenceNodes.getReferenceNode(ReferenceNodes.java:43)
    at org.neo4j.gis.spatial.SpatialDatabaseService.getSpatialRoot(SpatialDatabaseService.java:78)
    at org.neo4j.gis.spatial.SpatialDatabaseService.getLayer(SpatialDatabaseService.java:114)
    at org.neo4j.gis.spatial.SpatialDatabaseService.getOrCreateLayer(SpatialDatabaseService.java:208)

它看起来像是2.1版。neo4j内核的第7部分(此依赖项来自SDN rest)不再提供execute(…)类GraphDatabaseService中的方法。但是Spatial正在组织中调用此方法。neo4j。地理信息系统。空间的公用事业参考节点。getReferenceNode(ReferenceNodes.java:43)

[INFO] +- org.springframework.data:spring-data-neo4j-rest:jar:3.3.0.RELEASE:compile
[INFO] |  +- org.neo4j:neo4j-kernel:jar:2.1.7:compile
[INFO] |  |  \- org.neo4j:neo4j-primitive-collections:jar:2.1.7:compile
[INFO] |  \- org.neo4j:neo4j-lucene-index:jar:2.1.7:compile
[INFO] |     \- org.apache.lucene:lucene-core:jar:3.6.2:compile

所以我试图用版本2.2.1或2.2.0覆盖neo4j内核,但仍然不工作,我得到了一个丢失的类org/neo4j/内核/impl/nioneo/store/StoreId

所以我在本地“git clone”spring-data-neo4j-rest并构建了3.4版。0.BUILD-SNAPSHOT,删除对neo4j内核的覆盖。。。同样的错误:NoSuchMethodError:org。neo4j。图b。GraphDatabaseService。处决

但即使使用neo4j内核2.2。1或2.2。0时,我仍然会收到以前的错误:缺少org/neo4j/kernel/impl/nioneo/store/StoreId

你知道我如何解决这个问题吗?

谢谢。

以防万一,这里是maven依赖项:树,本地构建为spring-data-neo4j-rest,不覆盖neo4j内核版本2.1。7 :

[INFO] +- org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.34:compile
[INFO] +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.34:compile
[INFO] +- org.apache.tomcat.embed:tomcat-embed-jasper:jar:7.0.34:compile
[INFO] |  \- org.eclipse.jdt.core.compiler:ecj:jar:3.7.2:compile
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:7.0.34:compile
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:7.0.34:compile
[INFO] |  \- org.apache.tomcat:tomcat-util:jar:7.0.34:compile
[INFO] +- org.apache.tomcat:tomcat-jasper-el:jar:7.0.34:compile
[INFO] +- org.apache.tomcat:tomcat-jsp-api:jar:7.0.34:compile
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.0:provided
[INFO] +- javax.mail:mail:jar:1.4.1:compile
[INFO] |  \- javax.activation:activation:jar:1.1:compile
[INFO] +- antlr:antlr:jar:2.7.6:compile
[INFO] +- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.apache.commons:commons-email:jar:1.3.3:compile
[INFO] +- commons-validator:commons-validator:jar:1.4.1:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- com.google.gdata:core:jar:1.47.1:compile
[INFO] |  +- com.google.guava:guava:jar:13.0.1:compile
[INFO] |  +- com.google.oauth-client:google-oauth-client-jetty:jar:1.11.0-beta:compile
[INFO] |  |  +- com.google.oauth-client:google-oauth-client-java6:jar:1.11.0-beta:compile
[INFO] |  |  |  \- com.google.oauth-client:google-oauth-client:jar:1.11.0-beta:compile
[INFO] |  |  |     \- com.google.http-client:google-http-client:jar:1.11.0-beta:compile
[INFO] |  |  |        +- org.apache.httpcomponents:httpclient:jar:4.0.3:compile
[INFO] |  |  |        |  \- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO] |  |  |        \- xpp3:xpp3:jar:1.1.4c:compile
[INFO] |  |  \- org.mortbay.jetty:jetty:jar:6.1.26:compile
[INFO] |  |     +- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
[INFO] |  |     \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:compile
[INFO] |  \- com.google.code.findbugs:jsr305:jar:1.3.7:compile
[INFO] +- log4j:apache-log4j-extras:jar:1.1:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.2.1:compile
[INFO] |  \- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] +- commons-chain:commons-chain:jar:1.2:compile
[INFO] +- commons-codec:commons-codec:jar:1.4:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.2.2:runtime
[INFO] +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- commons-io:commons-io:jar:1.4:compile
[INFO] +- commons-lang:commons-lang:jar:2.5:compile
[INFO] +- commons-net:commons-net:jar:1.4.1:compile
[INFO] |  \- oro:oro:jar:2.0.8:compile
[INFO] +- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.17:compile
[INFO] +- com.sun.jersey:jersey-server:jar:1.19:compile
[INFO] |  \- com.sun.jersey:jersey-core:jar:1.19:compile
[INFO] |     \- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] +- com.sun.jersey:jersey-client:jar:1.19:compile
[INFO] +- com.sun.jersey.contribs:jersey-apache-client:jar:1.19:compile
[INFO] +- com.sun.jersey.contribs:jersey-multipart:jar:1.19:compile
[INFO] |  \- org.jvnet.mimepull:mimepull:jar:1.9.3:compile
[INFO] +- org.jvnet:mimepull:jar:1.4:compile
[INFO] +- com.sun.jersey:jersey-json:jar:1.19:compile
[INFO] |  +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] |  |     \- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:compile
[INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:compile
[INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:compile
[INFO] |  \- org.codehaus.jackson:jackson-xc:jar:1.9.2:compile
[INFO] +- com.sun.jersey.contribs:jersey-spring:jar:1.19:compile
[INFO] |  \- com.sun.jersey:jersey-servlet:jar:1.19:compile
[INFO] +- com.fasterxml:jackson-module-hibernate:jar:1.9.1:compile
[INFO] +- org.freemarker:freemarker:jar:2.3.18:compile
[INFO] +- org.springframework:spring-core:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.1.6.RELEASE:compile
[INFO] |  \- org.aspectj:aspectjweaver:jar:1.8.5:compile
[INFO] +- org.springframework:spring-context-support:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:4.1.6.RELEASE:compile
[INFO] |  \- org.springframework:spring-aop:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-jms:jar:4.1.6.RELEASE:compile
[INFO] |  \- org.springframework:spring-messaging:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.1.6.RELEASE:compile
[INFO] |  \- org.springframework:spring-web:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-neo4j:jar:3.4.0.BUILD-SNAPSHOT:compile
[INFO] |  +- org.aspectj:aspectjrt:jar:1.8.5:compile
[INFO] |  +- org.springframework.data:spring-data-commons:jar:1.11.0.BUILD-SNAPSHOT:compile
[INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:2.0.1:compile
[INFO] |  +- org.neo4j:neo4j:jar:2.1.7:compile
[INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:2.1.7:compile
[INFO] |  |  +- org.neo4j:neo4j-udc:jar:2.1.7:compile
[INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:2.1.7:compile
[INFO] |  |  +- org.neo4j:neo4j-cypher:jar:2.1.7:compile
[INFO] |  |  |  +- org.neo4j:neo4j-cypher-commons:jar:2.1.7:compile
[INFO] |  |  |  +- org.neo4j:neo4j-cypher-compiler-1.9:jar:2.0.3:compile
[INFO] |  |  |  +- org.neo4j:neo4j-cypher-compiler-2.0:jar:2.0.3:compile
[INFO] |  |  |  +- org.neo4j:neo4j-cypher-compiler-2.1:jar:2.1.7:compile
[INFO] |  |  |  +- org.parboiled:parboiled-scala_2.10:jar:1.1.6:compile
[INFO] |  |  |  |  \- org.parboiled:parboiled-core:jar:1.1.6:compile
[INFO] |  |  |  +- net.sf.opencsv:opencsv:jar:2.3:compile
[INFO] |  |  |  +- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.3.1:compile
[INFO] |  |  |  \- org.scala-lang:scala-library:jar:2.10.4:compile
[INFO] |  |  \- org.neo4j:neo4j-jmx:jar:2.1.7:compile
[INFO] |  +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] |  \- org.slf4j:jcl-over-slf4j:jar:1.7.10:runtime
[INFO] +- org.springframework.data:spring-data-neo4j-rest:jar:3.4.0.BUILD-SNAPSHOT:compile
[INFO] |  +- org.neo4j:neo4j-kernel:jar:2.1.7:compile
[INFO] |  |  \- org.neo4j:neo4j-primitive-collections:jar:2.1.7:compile
[INFO] |  \- org.neo4j:neo4j-lucene-index:jar:2.1.7:compile
[INFO] |     \- org.apache.lucene:lucene-core:jar:3.6.2:compile
[INFO] +- org.springframework.data:spring-data-rest-webmvc:jar:2.3.0.RELEASE:compile
[INFO] |  +- org.springframework.data:spring-data-rest-core:jar:2.3.0.RELEASE:compile
[INFO] |  |  +- org.springframework.hateoas:spring-hateoas:jar:0.17.0.RELEASE:compile
[INFO] |  |  |  \- org.objenesis:objenesis:jar:2.1:compile
[INFO] |  |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  \- org.atteo:evo-inflector:jar:1.2.1:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.5.1:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.5.1:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.5.1:compile
[INFO] |  \- com.github.fge:json-patch:jar:1.7:compile
[INFO] |     \- com.github.fge:jackson-coreutils:jar:1.6:compile
[INFO] |        \- com.github.fge:msg-simple:jar:1.1:compile
[INFO] |           \- com.github.fge:btf:jar:1.2:compile
[INFO] +- org.neo4j:neo4j-spatial:jar:0.14-neo4j-2.2.0:compile
[INFO] |  +- org.geotools:gt-main:jar:9.2:compile
[INFO] |  |  +- org.geotools:gt-api:jar:9.2:compile
[INFO] |  |  +- com.vividsolutions:jts:jar:1.13:compile
[INFO] |  |  +- jdom:jdom:jar:1.0:compile
[INFO] |  |  \- javax.media:jai_core:jar:1.1.3:compile
[INFO] |  +- org.geotools:gt-shapefile:jar:9.2:compile
[INFO] |  |  +- org.geotools:gt-data:jar:9.2:compile
[INFO] |  |  \- org.geotools:gt-referencing:jar:9.2:compile
[INFO] |  |     +- java3d:vecmath:jar:1.3.2:compile
[INFO] |  |     +- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] |  |     +- org.geotools:gt-metadata:jar:9.2:compile
[INFO] |  |     |  \- org.geotools:gt-opengis:jar:9.2:compile
[INFO] |  |     |     \- net.java.dev.jsr-275:jsr-275:jar:1.0-beta-2:compile
[INFO] |  |     \- jgridshift:jgridshift:jar:1.0:compile
[INFO] |  +- org.geotools:gt-process:jar:9.2:compile
[INFO] |  |  +- org.geotools:gt-coverage:jar:9.2:compile
[INFO] |  |  |  +- it.geosolutions.imageio-ext:imageio-ext-tiff:jar:1.1.7:compile
[INFO] |  |  |  |  +- it.geosolutions.imageio-ext:imageio-ext-utilities:jar:1.1.7:compile
[INFO] |  |  |  |  \- javax.media:jai_codec:jar:1.1.3:compile
[INFO] |  |  |  +- org.jaitools:jt-zonalstats:jar:1.3.0:compile
[INFO] |  |  |  \- org.jaitools:jt-utils:jar:1.3.0:compile
[INFO] |  |  +- org.geotools:gt-cql:jar:9.2:compile
[INFO] |  |  \- javax.media:jai_imageio:jar:1.1:compile
[INFO] |  +- org.geotools:gt-render:jar:9.2:compile
[INFO] |  \- com.googlecode.json-simple:json-simple:jar:1.1:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.6.5.Final:compile
[INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] |  \- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] +- org.hibernate:hibernate-validator-annotation-processor:jar:4.1.0.Final:compile
[INFO] |  \- org.hibernate:hibernate-validator:jar:4.1.0.Final:compile
[INFO] +- javassist:javassist:jar:3.12.0.GA:compile
[INFO] +- joda-time:joda-time:jar:1.6.2:compile
[INFO] +- joda-time:joda-time-hibernate:jar:1.3:compile
[INFO] +- log4j:log4j:jar:1.2.16:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] +- org.bouncycastle:bcprov-ext-jdk15on:jar:1.47:compile
[INFO] +- org.jasypt:jasypt:jar:1.8:compile
[INFO] +- junit:junit:jar:3.8.2:test
[INFO] +- junit:junit-dep:jar:4.8.1:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- org.springframework.security:spring-security-core:jar:4.0.1.RELEASE:compile
[INFO] \- javax.validation:validation-api:jar:1.1.0.Final:compile

共有1个答案

缑勇锐
2023-03-14

还没有,对不起,我清单上的许多待办事项之一:(。

但对于REST服务器来说,这并不重要。您可以将spatial插件部署到Neo4j服务器,然后它应该通过restapi使用索引。

对于嵌入式系统,您必须等待SDN 3.3与Neo4j 2.2兼容

再次抱歉。

 类似资料:
  • 我已经构建了一个应用程序,它是一个Eureka服务器,服务注册表。 pom.xml如下所示: 运行应用程序的主要类如下所示: 当我删除pom.xml中的eureka依赖项时,应用程序运行成功。 哪里不对?

  • 不知道Spring Data Elasticsearch 3.0.6支持哪个版本的Elasticsearch? 目前我正在使用Elasticsearch 6.2,这兼容吗?现在我正在使用Elasticsearch Rest Client进行Java,但是由于我使用的是Spring,所以我考虑使用Spring Data Elasticsearch。

  • 我有一个Spring云配置服务器,运行在Dalston发布列车下。它已经生产了几年,为一些旧的Spring Boot应用程序提供配置。今天,我正在尝试构建一个新的Spring Boot 2.3.0应用程序。当我的应用程序启动并尝试从配置服务器获取其配置时,配置服务器只会返回406 Not Acceptable。我可以成功地浏览到我的应用程序试图获取的配置URL,并在我的浏览器中查看配置,所以我想知

  • 有没有办法检查Spring框架和Springboot版本的兼容性? 我最近从Spring v4.3.20. RELEASE切换到Spring v5.2.20. RELEASE和Spring v1.5.17到v2.1.10. RELEASE现在,我面临着许多兼容性问题。我很难找出兼容的版本。 请帮忙

  • 我终于能够在我的java应用程序中创建一个服务器实例,使用嵌入式数据库,如下所述。当我在Eclipse上运行它时,它可以正常工作,但这实际上不是我的目的(我的应用程序在其他事情之间,为数据库提供新的节点和关系)。我有一个Neo4j盒子,它应该是我的服务器实例,我想把我的应用程序作为JAR文件部署在那里。这样,我想从那里访问web界面。我已经对它进行了测试:在我的开发机器上运行java应用程序时,同