我有客户端工作,看起来一切正常。我可以保存对象并从客户端检索对象。
但是,如果我尝试使用gfsh或数据浏览器查看数据,我在gfsh上得到了这个异常
Message : Could not create an instance of a class com.room.backend.soa.spring.cache.geode.test.domain.Book
Result : false
和数据浏览器
javalangException- Query could not be executed due to - orgapachegeodepdxPdxSerializationException- Could not create an instance of a class comroombackendsoaspringcachegeodetestdomainBook
我的代码是这样的
ClientCacheFactoryBean gemfireCache = new ClientCacheFactoryBean();
gemfireCache.setClose(true);
gemfireCache.setProperties(gemfireProperties);
gemfireCache.setPdxSerializer(pdxSerializer);
pdxSerializer是
ReflectionBasedAutoSerializer serializer =
new ReflectionBasedAutoSerializer(
"com.room.backend.soa.spring.cache.geode.test.domain.*",
"com.room.backend.soa.spring.cache.geode.test.domain.Book",
"com.room.backend.soa.spring.cache.geode.test.domain.Book#identity=id.*",
"com.room.backend.soa.spring.cache.geode.test.domain.#identity=id.*"
);
您需要运行gfsh