I'm trying to follow the instructions listed here () to set up web session
clustering with my company's already existing application. If I don't configure
a default-config.xml in the web.xml, ignite starts and both nodes see each
other; however it doesn't appear that data is being stored in an ignite cache.
If I configure a default-config.xml in the web.xml, I get the following error.
Caused by: class org.apache.ignite.IgniteException: Failed to load Ignite
configuration.
at
org.apache.ignite.startup.servlet.ServletContextListenerStartup.contextInitialized(ServletContextListenerStartup.java:135)
at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5396)
at
com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:743)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5965)
... 26 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
instantiate Spring XML application context
[springUrl=jndi:/server/META-INF/config/default-config.xml, err=Error creating
bean with name 'org.apache.ignite.configuration.IgniteConfiguration#0' defined
in URL [jndi:/server/META-INF/config/default-config.xml]: Cannot create inner
bean 'org.apache.ignite.configuration.CacheConfiguration#487ee2da' 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#487ee2da' defined
in URL [jndi:/server/META-INF/config/default-config.xml]: Initialization of
bean failed; nested exception is
org.springframework.beans.TypeMismatchException: Failed to convert property
value of type [java.lang.String] to required type [java.lang.String] for
property 'name'; nested exception is java.lang.IllegalArgumentException: Method
must not be null]
at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:391)
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:639)
at
org.apache.ignite.startup.servlet.ServletContextListenerStartup.contextInitialized(ServletContextListenerStartup.java:132)
... 29 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.ignite.configuration.IgniteConfiguration#0'
defined in URL [jndi:/server/META-INF/config/default-config.xml]: Cannot create
inner bean 'org.apache.ignite.configuration.CacheConfiguration#487ee2da' 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#487ee2da' defined
in URL [jndi:/server/META-INF/config/default-config.xml]: Initialization of
bean failed; nested exception is
org.springframework.beans.TypeMismatchException: Failed to convert property
value of type [java.lang.String] to required type [java.lang.String] for
property 'name'; nested exception is java.lang.IllegalArgumentException: Method
must not be null
Is my default-config.xml configured improperly? I tried finding examples
online, but it's sparse.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="cacheConfiguration">
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="session-cache"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="1"/>
<property name="evictionPolicy">
<bean
class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
<property name="maxSize" value="150000"/>
</bean>
</property>
</bean>
</property>
</bean>
</beans>