I'm trying to set gemfire cache with pdx-serializer with the new attribute that included in the latest spring-gemfire release , but always fail with error message "Invalid pdx serializer usedclass java.lang.String is not assignable to interface com.gemstone.gemfire.pdx.PdxSerializer" .
Below is the configuration of gemfire cache and the error information :
<gfe:cache pdx-read-serialized="true" pdx-serializer="cacheSerializer" />
<bean id="cacheSerializer" class="com.gemstone.gemfire.pdx.ReflectionBasedAut oSerializer">
<constructor-arg ref="serializedClasses"></constructor-arg>
</bean>
<util:list id="serializedClasses" list-class="java.util.ArrayList" value-type="java.lang.String">
<value>com.anabatic.zeus.core.intf.Context</value>
<value>com.anabatic.zeus.core.intf.SessionContex t</value>
<value>com.anabatic.zeus.core.intf.ObjectMessage </value>
</util:list>
Caused by: java.lang.IllegalArgumentException: Invalid pdx serializer usedclass java.lang.String is not assignable to interface com.gemstone.gemfire.pdx.PdxSerializer
at org.springframework.util.Assert.isAssignable(Asser t.java:368)
at org.springframework.data.gemfire.CacheFactoryBean$ PdxOptions.run(CacheFactoryBean.java:78)
at org.springframework.data.gemfire.CacheFactoryBean. applyPdxOptions(CacheFactoryBean.java:180)
at org.springframework.data.gemfire.CacheFactoryBean. afterPropertiesSet(CacheFactoryBean.java:143)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
... 16 more
Any idea how to get spring-gemfire work with pdx-serializer? I couldn't found any guideline from the spring-gemfire user manual related this new attribute


Reply With Quote