0

Getting the following exception when I try to execute the query to create a relationship between nodes

java.lang.NoSuchMethodError: org.neo4j.ogm.session.Session.execute(Ljava/lang/String;)V at org.springframework.data.neo4j.template.Neo4jTemplate.execute(Neo4jTemplate.java:183)

I am using the following dependencies in pom.xml

<dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-ogm</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j</artifactId>
            <version>4.0.0.M1</version>
        </dependency>

My code is something like in service POJO

private void createServiceRelationships( XXX yyyy, Neo4JExtension template) throws Exception {

    Boolean zzz = yyyy.getKKKKK();

    String queryBegin = "MATCH (n:XXX {pk:'"
            + XXX.getPk() + "' })";


    for (String LLLL : XXXX.getLLLL()) {
        String cipherQuery = ",(m:" + Name + "ROOT" + "{pk:'"
                + Name + "ROOT"
                + "' }) CREATE (m)-[:ROOT]->(n)";
        template.execute(queryBegin + cipherQuery);
    }

}

Kindly help

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
milan garg
  • 21
  • 6

1 Answers1

0

There's no need to include the neo4j-ogm dependency. In fact, with SDN 4.0.0.M1 you shouldn't. Please upgrade to SDN 4.0.0.RC1 - it contains many fixes and features since M1.

Luanne
  • 19,145
  • 1
  • 39
  • 51