Neo4j-spatial compatibility with spring-data-neo4j-rest and neo4j CE 2.2.1 server mode?

I'm trying to do 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.

They seem to be incompatible. Attempting to create a new instance of the EditableLayer class throws a NoSuchMethod exception.

For example:

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

      

I am getting an exception:

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)

      

It looks like version 2.1.7 from neo4j core (this dependency comes from SDN-rest) no longer provides an execute (...) method in the GraphDatabaseService class. But Spatial calls 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

      

So I tried to override neo4j-kernel with version 2.2.1 or 2.2.0 but still doesn't work and I get missing class org / neo4j / kernel / impl / nioneo / store / StoreId

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

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

Do you have any idea how I can solve this problem?

thank.

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

      

+1


source to share


1 answer


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

But for a REST server, it doesn't matter. You have to deploy the spatial plugin to Neo4j-Server and then use the indexes via the REST API.



For an embedded device, you'll have to wait until SDN 3.3 is Neo4j 2.2 compatible

Sorry again.

0


source







All Articles