Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-1246

Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Failed to validate cache configuration. Cache store factory is not serializable. Cache name: XXXXXXX

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Here is my configuration

      <bean id="dataSource"
      		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
      
      		<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
      		<property name="url"
      			value="jdbc:oracle:thin:@//192.168.2.39:1521/db" />
      		<property name="username" value="abc" />
      		<property name="password" value="abc" />
      	</bean>
      
      
      
      <bean id="cache.cfg" class="org.apache.ignite.configuration.CacheConfiguration" scope="prototype">
      		<property name="memoryMode" value="OFFHEAP_TIERED" />
      		<property name="offHeapMaxMemory" value="#{4 * 1024L * 1024L * 1024L}" />
      		<property name="atomicityMode" value="ATOMIC" />
      		<property name="backups" value="1" />
      		<!-- 
      		<property name="interceptor">
      			<bean class="com.fangcang.cache.core.interceptor.IncrInterceptor" />
      		</property>
      		 -->
      		<property name="cacheStoreFactory">
      			<bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
      				<constructor-arg>
      					<bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
      						<property name="dataSource" ref="dataSource"/>
      					</bean>
      				</constructor-arg>
      			</bean>
      		</property>
      	</bean>
      

      When I try to load data to the cache I got the exception.
      here is he stack from client node

      Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Failed to validate cache configuration. Cache store factory is not serializable. Cache name: T_HTLPRO_PRICEPLAN
      	at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1581)
      	at org.apache.ignite.internal.IgniteKernal.getOrCreateCache(IgniteKernal.java:2311)
      	at org.apache.ignite.IgniteSpringBean.getOrCreateCache(IgniteSpringBean.java:246)
      	at com.fangcang.cache.client.Grid.getCacheByCfg(Grid.java:30)
      	at com.fangcang.cache.client.InitLoader.main(InitLoader.java:16)
      Caused by: class org.apache.ignite.IgniteCheckedException: Failed to validate cache configuration. Cache store factory is not serializable. Cache name: T_HTLPRO_PRICEPLAN
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkSerializable(GridCacheProcessor.java:3038)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:1958)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:1927)
      	at org.apache.ignite.internal.IgniteKernal.getOrCreateCache(IgniteKernal.java:2306)
      	... 3 more
      Caused by: class org.apache.ignite.IgniteCheckedException: Failed to serialize object: javax.cache.configuration.FactoryBuilder$SingletonFactory@55dfebeb
      	at org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:78)
      	at org.apache.ignite.marshaller.AbstractMarshaller.marshal(AbstractMarshaller.java:51)
      	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkSerializable(GridCacheProcessor.java:3034)
      	... 6 more
      Caused by: java.io.NotSerializableException: org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:73)
      	... 8 more
      
      

        Attachments

        1. ignite-02.png
          449 kB
          kcheng.mvp
        2. ignite-01.png
          448 kB
          kcheng.mvp

          Activity

            People

            • Assignee:
              kcheng.mvp kcheng.mvp
              Reporter:
              kcheng.mvp kcheng.mvp
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: