Hi, I think you need to use value of long directly, like this:
<property name="failureDetectionTimeout" value="10000L"/> On Thu, Aug 25, 2016 at 5:06 PM, yucigou <[email protected]> wrote: > Wonder if anyone understands why I get the following error? All I want to > do > is set the failureDetectionTimeout property: > > Aug 25, 2016 2:52:31 PM org.apache.catalina.core.StandardContext > listenerStart > SEVERE: Exception sending context initialized event to listener instance of > class org.apache.ignite.startup.servlet.ServletContextListenerStartup > 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.listenerStart( > StandardContext.java:4992) > at > org.apache.catalina.core.StandardContext.startInternal( > StandardContext.java:5490) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > org.apache.catalina.core.ContainerBase.addChildInternal( > ContainerBase.java:901) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) > at > org.apache.catalina.startup.HostConfig.deployDescriptor( > HostConfig.java:672) > at > org.apache.catalina.startup.HostConfig$DeployDescriptor. > run(HostConfig.java:1862) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker( > ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run( > ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteCheckedException: Failed to > instantiate Spring XML application context > [springUrl=jndi:/localhost/ukpmc/META-INF/apache-ignite.xml, err=Error > creating bean with name 'ignite.cfg' defined in URL > [jndi:/localhost/ukpmc/META-INF/apache-ignite.xml]: Error setting pr > operty values; nested exception is > org.springframework.beans.NotWritablePropertyException: Invalid property > 'failureDetectionTimeout' of bean class > [org.apache.ignite.configuration.IgniteConfiguration]: Bean property > 'failureDetectionTimeout' is not writable or has an invalid setter method. > Does the pa > rameter type of the setter match the return type of the getter?] > 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) > ... 13 more > Caused by: org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'ignite.cfg' defined in URL > [jndi:/localhost/ukpmc/META-INF/apache-ignite.xml]: Error setting property > values; nested exception is > org.springframework.beans.NotWritablePropertyException: Invalid property ' > failureDetectionTimeout' of bean class > [org.apache.ignite.configuration.IgniteConfiguration]: Bean property > 'failureDetectionTimeout' is not writable or has an invalid setter method. > Does the parameter type of the setter match the return type of the getter? > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.createBean(AbstractAutowireCapableBeanFactory.java:456) > at > org.springframework.beans.factory.support.AbstractBeanFactory$1. > getObject(AbstractBeanFactory.java:294) > at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry. > getSingleton(DefaultSingletonBeanRegistry.java:225) > at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( > AbstractBeanFactory.java:291) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean( > AbstractBeanFactory.java:193) > at > org.springframework.beans.factory.support.DefaultListableBeanFactory. > preInstantiateSingletons(DefaultListableBeanFactory.java:609) > at > org.springframework.context.support.AbstractApplicationContext. > finishBeanFactoryInitialization(AbstractApplicationContext.java:918) > at > org.springframework.context.support.AbstractApplicationContext.refresh( > AbstractApplicationContext.java:469) > at > org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl. > applicationContext(IgniteSpringHelperImpl.java:381) > ... 17 more > Caused by: org.springframework.beans.NotWritablePropertyException: Invalid > property 'failureDetectionTimeout' of bean class > [org.apache.ignite.configuration.IgniteConfiguration]: Bean property > 'failureDetectionTimeout' is not writable or has an invalid setter method. > Does the parameter type of the sett > er match the return type of the getter? > at > org.springframework.beans.BeanWrapperImpl.setPropertyValue( > BeanWrapperImpl.java:1064) > at > org.springframework.beans.BeanWrapperImpl.setPropertyValue( > BeanWrapperImpl.java:924) > at > org.springframework.beans.AbstractPropertyAccessor.setPropertyValues( > AbstractPropertyAccessor.java:76) > at > org.springframework.beans.AbstractPropertyAccessor.setPropertyValues( > AbstractPropertyAccessor.java:58) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393) > ... 28 more > > *I'm using Ignite 1.7.0, and my configuration is like below:* > > <?xml version="1.0" encoding="UTF-8"?> > > <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 id="ignite.cfg" > class="org.apache.ignite.configuration.IgniteConfiguration"> > > <property name="cacheConfiguration"> > <list> > > <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="memoryMode" > value="OFFHEAP_VALUES"/> > > > <property name="offHeapMaxMemory" > value="#{2 * 1024L * 1024L * > 1024L}"/> > > > <property name="evictionPolicy"> > <bean > class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy"> > <property name="maxSize" > value="10000"/> > </bean> > </property> > > </bean> > </list> > </property> > > <property name="failureDetectionTimeout" value="15000" /> > > <property name="discoverySpi"> > <bean class="org.apache.ignite.spi. > discovery.tcp.TcpDiscoverySpi"> > > <property name="localPort" value="48100"/> > <property name="localPortRange" value="10" /> > > <property name="ipFinder"> > <bean > class="org.apache.ignite.spi.discovery.tcp.ipfinder.zk. > TcpDiscoveryZookeeperIpFinder"> > <property name="zkConnectionString" > value="ves-hx-40:2181,ves-hx-41:2181"/> > </bean> > > </property> > </bean> > </property> > > <property name="communicationSpi"> > <bean > class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi"> > <property name="localPort" value="48500" /> > <property name="localPortRange" value="10" > /> > </bean> > </property> > > <property name="binaryConfiguration"> > <bean class="org.apache.ignite.configuration. > BinaryConfiguration"> > <property name="compactFooter" value="false"/> > </bean> > </property> > </bean> > </beans> > > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/failureDetectionTimeout-NotWritablePropertyException- > tp7304.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Vladislav Pyatkov
