[jira] [Created] (IGNITE-7815) IgniteSpringBean implements SmartInitializingSingleton in version 2.3.2+

2018-02-26 Thread Valeri Chibaev (JIRA)
Valeri Chibaev created IGNITE-7815:
--

 Summary: IgniteSpringBean implements SmartInitializingSingleton in 
version 2.3.2+
 Key: IGNITE-7815
 URL: https://issues.apache.org/jira/browse/IGNITE-7815
 Project: Ignite
  Issue Type: Bug
Affects Versions: 2.3
Reporter: Valeri Chibaev


IgniteSpringBean changed the way it starts Ignite grid:
 * implements InitializingBean#afterPropertiesSet in version 2.3.1
 * implements SmartInitializingSingleton#afterSingletonsInstantiated in version 
2.3.2+

This cause problem in my code that uses spring cache 
@org.springframework.cache.annotation.Cacheable via 
org.apache.ignite.cache.spring.SpringCacheManager throwing error from spring 
bean initialisation:

 
{code:java}
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'cacheManager' defined in class path resource 
[spring-inc-cache.xml]: Invocation of init method failed; nested exception is 
class org.apache.ignite.IgniteIllegalStateException: Ignite instance with 
provided name doesn't exist. Did you call Ignition.start(..) to start an Ignite 
instance? [name=mktrsk-ignite-grid]
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
... 27 common frames omitted
Caused by: org.apache.ignite.IgniteIllegalStateException: Ignite instance with 
provided name doesn't exist. Did you call Ignition.start(..) to start an Ignite 
instance? [name=mktrsk-ignite-grid]
at org.apache.ignite.internal.IgnitionEx.grid(IgnitionEx.java:1312) 
~[ignite-core-2.3.3.jar!/:2.3.3]
at org.apache.ignite.Ignition.ignite(Ignition.java:530) 
~[ignite-core-2.3.3.jar!/:2.3.3]
at 
org.apache.ignite.cache.spring.SpringCacheManager.afterPropertiesSet(SpringCacheManager.java:328)
 ~[ignite-spring-2.3.3.jar!/:2.3.3]
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
 ~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
... 34 common frames omitted
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-6432) SpringCacheManager#getCacheNames() is empty

2017-09-19 Thread Valeri Chibaev (JIRA)
Valeri Chibaev created IGNITE-6432:
--

 Summary: SpringCacheManager#getCacheNames() is empty
 Key: IGNITE-6432
 URL: https://issues.apache.org/jira/browse/IGNITE-6432
 Project: Ignite
  Issue Type: Bug
Affects Versions: 2.1
Reporter: Valeri Chibaev


Application ignite started with org.apache.ignite.IgniteSpringBean, then 
SpringCacheManager created
{code}

  

  

  



{code}
If I'll check cacheManager.getCacheNames() - it is empty.
But if I check cacheManager.getCache("refdata.labelType") metrics and repeat 
call cacheManager.getCacheNames() - it is not empty.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)