Results 1 to 5 of 5

Thread: Unabel to Autowire Neo4jOperations

  1. #1
    Join Date
    Dec 2011
    Posts
    4

    Default Unabel to Autowire Neo4jOperations

    Hi, I am new to Neo4j and would like to try it out using spring-data. I have a basic maven project and am following examples from here: https://github.com/SpringSource/spri...mples/cineasts

    The build fails trying to Autowire Neo4jOperations:

    @Autowired private Neo4jOperations template;

    Maven output:
    No matching bean of type [org.springframework.data.neo4j.template.Neo4jOpera tions] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Aut owired(required=true)}

    I have these dependencies in pom.xml relating to Neo4j:
    Code:
    <dependency>
    	<groupId>org.springframework.data</groupId>
    	<artifactId>spring-data-neo4j</artifactId>
    	<version>2.0.0.RC1</version>
    </dependency>
    <dependency>
    	<groupId>org.neo4j</groupId>
    	<artifactId>neo4j</artifactId>
    	<version>1.6.M02</version>
    </dependency>
    Not sure where to go from here. Any feedback greatly appreciated!

    Markus

  2. #2
    Join Date
    Dec 2011
    Posts
    4

    Default

    OK, I think I figured this one out halfway. Something is missing in the bean definition XML.

  3. #3
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    Ok, thanks for the information, is there something missing in the docs?

    Enjoy Spring Data Neo4j and please provide feedback when you run into things.

    Michael

  4. #4
    Join Date
    Dec 2011
    Posts
    4

    Default

    I was simply forgetting to include the bean definitions for neo4j. That is fixed but now I am getting this error message when running mvn:

    Code:
    Context initialization failed
    java.lang.NoClassDefFoundError: org/springframework/data/convert/TypeAliasAccessor
    I think I am missing a dependency but I can't figure out which one. Any idea?

    Thanks,
    Markus

  5. #5
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    Did you put in a manual dependency on spring-data-commons? This class is from spring data commons, version 1.2.0.

    Cheers

    Michael

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •