Hello,

I know I made something silly but not able to figure it out. I was checking
the cache config from Ignite website and copy pasted the config from there
but something is wrong on that XML and getting the error.

please help me to figure it out (Ignite 2.3, Spring 5.02)

<property name="cacheConfiguration">
            <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                <!-- Set a cache name. -->

                <property name="name" value="cacheName" />
                <!-- Set cache mode. -->
                <property name="cacheMode" value="PARTITIONED" />
                <!-- Number of backup nodes. -->
                <property name="backups" value="1" />
                   <!-- Set write synchronization mode. -->
                <property name="writeSynchronizationMode"
value="PRIMARY_SYNC"/>
                  <!-- Store cache entries on-heap. -->
                  <property name="memoryMode" value="ONHEAP_TIERED"/>

                  <!-- Enable Off-Heap memory with max size of 10 Gigabytes
(0 for unlimited). -->
                  <property name="offHeapMaxMemory" value="#{10 * 1024L *
1024L * 1024L}" />

                  <!-- Configure eviction policy. -->
                  <property name="evictionPolicy">
                    <bean
class="org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy">
                      <!-- Evict to off-heap after cache size reaches
maxSize. -->
                      <property name="maxSize" value="100000"/>
                    </bean>
                  </property>

            </bean>
        </property>


class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
application context (make sure all classes used in Spring configuration are
present at CLASSPATH) [springUrl=file:/D:/RajWS/Sample/config/ignite.xml]
    at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:966)
    at org.apache.ignite.Ignition.start(Ignition.java:350)

Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
instantiate Spring XML application context (make sure all classes used in
Spring configuration are present at CLASSPATH) [springUrl=file:/D:/RajWS/
Sample/config/ignite.xml]
    at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:387)
    at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
    at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
    at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:673)
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:874)
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:783)
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:653)
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:622)
    at org.apache.ignite.Ignition.start(Ignition.java:347)
    ... 2 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'ignite.cfg$child#0' defined in URL [file:/D:/RajWS/
Sample/config/ignite.xml]: Cannot create inner bean
'org.apache.ignite.configuration.CacheConfiguration#3aefe5e5' of type
[org.apache.ignite.configuration.CacheConfiguration] while setting bean
property 'cacheConfiguration'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.apache.ignite.configuration.CacheConfiguration#3aefe5e5' defined in
URL [file:/D:/RajWS/Sample/config/default.xml]: Cannot create inner bean
'org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy#1184ab05' of
type [org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy] while
setting bean property 'evictionPolicy'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy] for
bean with name
'org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy#1184ab05'
defined in URL [file:/D:/RajWS/Sample/config/default.xml]; nested exception
is java.lang.ClassNotFoundException:
org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:327)
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:124)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1613)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1357)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:758)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
    at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:381)
    ... 10 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.ignite.configuration.CacheConfiguration#3aefe5e5' defined in
URL [file:/D:/RajWS/Sample/config/default.xml]: Cannot create inner bean
'org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy#1184ab05' of
type [org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy] while
setting bean property 'evictionPolicy'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy] for
bean with name
'org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy#1184ab05'
defined in URL [file:/D:/RajWS/Sample/config/default.xml]; nested exception
is java.lang.ClassNotFoundException:
org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:327)
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:124)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1613)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1357)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:312)
    ... 23 more
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class
[org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy] for bean
with name
'org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy#1184ab05'
defined in URL [file:/D:/RajWS/Sample/config/default.xml]; nested exception
is java.lang.ClassNotFoundException:
org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy
    at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1380)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:474)
    at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:312)
    ... 29 more
Caused by: java.lang.ClassNotFoundException:
org.apache.ignite.cache.eviction.fifo.CacheFifoEvictionPolicy
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:255)
    at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:437)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1428)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1372)
    ... 31 more

-- 
Regards,
Rajarshi Pain

Reply via email to