neo4j-spatial与spring-data-neo4j-rest和neo4j CE 2.2.1服务器模式是否兼容? [英] Compatibility neo4j-spatial with spring-data-neo4j-rest and neo4j CE 2.2.1 server mode?

查看:109
本文介绍了neo4j-spatial与spring-data-neo4j-rest和neo4j CE 2.2.1服务器模式是否兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使neo4j-spatial版本为0.14-neo4j-2.2.0,可与spring-data-neo4j-rest版本3.3.0一起使用.在服务器模式下使用neo4j CE 2.2.1进行发布.

I'm trying to make neo4j-spatial version 0.14-neo4j-2.2.0, works with spring-data-neo4j-rest version 3.3.0.RELEASE with neo4j CE 2.2.1 in server mode.

它们似乎不兼容.尝试创建类EditableLayer的新实例会引发NoSuchMethod异常.

It looks like they are not compatible. Trying to create new instance of class EditableLayer throws NoSuchMethod exception.

例如:

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)

看来neo4j-kernel的2.1.7版本(此依赖项来自SDN-rest)不再在GraphDatabaseService类中提供execute(...)方法.但是Spatial在org.neo4j.gis.spatial.utilities.ReferenceNodes.getReferenceNode(ReferenceNodes.java:43)中调用此方法

It looks like version 2.1.7 of neo4j-kernel (this dependency comes from SDN-rest) does not provide anymore with execute(...) method in class GraphDatabaseService. But Spatial is calling this method in org.neo4j.gis.spatial.utilities.ReferenceNodes.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-kernel,但仍无法正常工作,并且缺少类org/neo4j/kernel/impl/nioneo/store/StoreId

So I tried to override neo4j-kernel with version 2.2.1 or 2.2.0, but still not working and I get a missing class org/neo4j/kernel/impl/nioneo/store/StoreId

因此,我在本地"git clone" spring-data-neo4j-rest并构建版本3.4.0.BUILD-SNAPSHOT,删除对neo4j内核的覆盖...相同的错误: NoSuchMethodError:org.neo4j.graphdb.GraphDatabaseService.execute

So I "git clone" spring-data-neo4j-rest on local and build version 3.4.0.BUILD-SNAPSHOT, remove override of neo4j-kernel... same error: NoSuchMethodError: org.neo4j.graphdb.GraphDatabaseService.execute

但是即使使用neo4j-kernel 2.2.1或2.2.0,我仍然会遇到相同的先前错误:org/neo4j/kernel/impl/nioneo/store/StoreId丢失

But even using neo4j-kernel 2.2.1 or 2.2.0, I still get same previous errors: org/neo4j/kernel/impl/nioneo/store/StoreId is missing

您知道如何解决此问题吗?

Do you have an idea how I could solve this problem?

谢谢.

以防万一,这是一个Maven依赖项:具有本地版本的spring-data-neo4j-rest的树,没有覆盖的Neo4j内核版本2.1.7:

Just in case, here is the maven dependency:tree with local build of spring-data-neo4j-rest and no overriding neo4j-kernel version 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

推荐答案

还不,对不起,我名单上的许多待办事项之一:(.

Not yet, sorry, one of the many todos on my list :(.

但是对于REST服务器来说没关系.您可以将空间插件部署到Neo4j-Server,然后通过REST API使用索引.

But for the REST-Server it shouldn't matter. You would deploy the spatial plugin to Neo4j-Server and then it should use the indexes via the REST API.

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

For embedded you would have to wait until SDN 3.3 is compatible with Neo4j 2.2

再次抱歉.

这篇关于neo4j-spatial与spring-data-neo4j-rest和neo4j CE 2.2.1服务器模式是否兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆