I am very very new with Apach Ignite :)

I will apreciate If someone can point me to a right direction with the
problem I am getting in my project. In my project we use Spring quite
heavily, but as soon as I add ignite-spring dependency to the project it
starts to fail with following exception:


org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'accountManagerAsync' defined in class
com.mycompany.rr.common.services.spring.CommonServicesConfiguration:
Instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public com.mycompany.rr.common.services.AccountManager
com.mycompany.rr.common.services.spring.CommonServicesConfiguration.accountManagerAsync(com.mycompany.rr.ds.dynamic.api.async.DatastoreAccess)]
threw exception; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'accountConfigurationManager' defined in class
com.mycompany.rr.common.services.spring.CommonServicesConfiguration: Can
only specify arguments for the getBean method when referring to a prototype
bean definition
        at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:601)
...
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Invalid bean definition with name 'accountConfigurationManager' defined in
class com.mycompany.rr.common.services.spring.CommonServicesConfiguration:
Can only specify arguments for the getBean method when referring to a
prototype bean definition
        at
org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:1277)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:203)
        at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322)
        at
com.mycompany.rr.common.services.spring.CommonServicesConfiguration$$EnhancerBySpringCGLIB$$449454e7.accountConfigurationManager(<generated>)
        at
com.mycompany.rr.common.services.spring.CommonServicesConfiguration.accountManagerAsync(CommonServicesConfiguration.java:60)


This happens when we do following calls:
AnnotationConfigApplicationContext springContext = new
AnnotationConfigApplicationContext();
springContext.register(RrSpringConfiguration.class);
springContext.getEnvironment().getPropertySources().addLast(new
PropertiesPropertySource("r7", config.getProperties()));
springContext.refresh();


and CommonServicesConfiguration.java:60 contains following bean definition:

@Configuration
@EnableDynamicDataStore
public class CommonServicesConfiguration {

    ...

    @Bean
    public AccountManager accountManagerAsync(DatastoreAccess dataStore) {
        AccountManager asyncAccountManager = new
AccountManager(cacheFactory(), dataStore,
accountConfigurationManager(dataStore), pluginManager(dataStore));
        return asyncAccountManager;
    }
    ...

}


As I meantioned I changed no line of code, just added Maven dependency:
<dependency>
  <groupId>org.apache.ignite</groupId>
  <artifactId>ignite-spring</artifactId>
  <version>${ignite.version}</version>
</dependency>
For testing sake I keep all other ignite dependencies commented out.

Is there something special what I need to do to integrate Apache Ignite into
my project ?




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/ignite-spring-conflict-tp8837.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to