0

I'm getting the following exception with tests:

org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.neo4j.repository.support.GraphRepositoryFactoryBean]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.springframework.data.neo4j.repository.support.GraphRepositoryFactoryBean.<init>()

Force updated dependencies.

SDN version: 4.0.0.BUILD-SNAPSHOT
Neo4j version: 2.2.5 (getting same error with 2.2.4)
OGM: 1.1.2-SNAPSHOT

...
<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-ogm</artifactId>
    <version>1.1.2-SNAPSHOT</version>
</dependency>

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-kernel</artifactId>
    <version>2.2.5</version>
</dependency>

<dependency>
    <groupId>org.neo4j.app</groupId>
    <artifactId>neo4j-server</artifactId>
    <version>2.2.5</version>
</dependency>

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>4.0.0.BUILD-SNAPSHOT</version>
</dependency>

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>4.0.0.BUILD-SNAPSHOT</version>
    <type>test-jar</type>
</dependency>

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-ogm</artifactId>
    <version>1.1.2-SNAPSHOT</version>
    <type>test-jar</type>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.neo4j.test</groupId>
    <artifactId>neo4j-harness</artifactId>
    <version>2.2.5</version>
    <scope>test</scope>
</dependency>

This only happens with tests.

Are there any changes in dependencies or configuration?

Thanks.

user1838830
  • 131
  • 1
  • 6
  • Please force an update with mvn -U and let me know if it still fails (with dependencies included) – Luanne Sep 03 '15 at 13:47
  • I did force update before running the tests. I've included the dependencies now. Thanks. – user1838830 Sep 03 '15 at 14:32
  • The snapshot version is 4.0.0.BUILD-SNAPSHOT but you seem to be using something else- 4.0.0-BUILD-SNAPSHOT. Have you installed this locally after changing it? Can you delete org/springframework/data/neo4j from your local maven repo and try once more? – Luanne Sep 03 '15 at 16:00
  • Sorry Luanne I am indeed using 4.0.0.BUILD-SNAPSHOT but accidentally wrote "4.0.0-BUILD-SNAPSHOT" in the question. – user1838830 Sep 04 '15 at 02:51
  • Your dependencies work for me. Do you have a project I can look at? Or mail the pom.xml to luanne at graphaware dot com please – Luanne Sep 04 '15 at 03:00

1 Answers1

1

For anyone else running into this issue, make sure your @ComponentScan excludes domain and repository packages.

Luanne
  • 19,145
  • 1
  • 39
  • 51