Reputation: 146
i want to use spring-data-neo4j in my grails application.
i've added the compile 'org.springframework.data:spring-data-neo4j:3.1.1.RELEASE'
dependency in BuildConfig.
After adding <neo4j:config storeDirectory="data/graph.db" />
to the applicationContext.xml
i get following exception at application start:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.data.neo4j.config.Neo4jConfiguration#0': Unsatisfied dependency expressed through bean property 'conversionService': : Error creating bean with name 'neo4jConversionService' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.springframework.core.convert.ConversionService org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jConversionService() throws java.lang.Exception] threw exception; nested exception is java.lang.IllegalStateException: BeanFactory has not been injected into @Configuration class; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jConversionService' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.springframework.core.convert.ConversionService org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jConversionService() throws java.lang.Exception] threw exception; nested exception is java.lang.IllegalStateException: BeanFactory has not been injected into @Configuration class
i use grails 2.4.2
what is the problem?
Upvotes: 1
Views: 576
Reputation: 146
the solution was to add <context:annotation-config/>
to the applicationContext.xml
Upvotes: 3