尝试从oracle一致性群集筛选数据时出现以下错误:
Exception in thread "main" Portable(com.tangosol.util.WrapperException): (Wrapped: Failed request execution for PartitionedCacheService service on Member PofExtractor must be used with POF-encoded Binary entries; the configured Serializer is not a PofContext
at com.tangosol.util.Base.ensureRuntimeException(Base.java:250)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:61)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onQueryRequest(PartitionedCache.CDB:50)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$QueryRequest.run(PartitionedCache.CDB:1)
at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:1)
我正在尝试运行以下代码:
@SuppressWarnings("rawtypes")
public static void getRiskTradeByApplyingOnlyOneFilterBenchmark(NamedCache riskTradeReadCache) throws Exception {
ValueExtractor valueExtractor = new PofExtractor(null, 10);
Filter filter = new EqualsFilter(valueExtractor, "USD");
Set allRiskTradesWhereCurrencyIsUsd = riskTradeReadCache.keySet(filter);
for (Object key : allRiskTradesWhereCurrencyIsUsd) {
final Object o = riskTradeReadCache.get(key);
}
}
下面是自定义的pof配置文件
<user-type-list>
<!-- include all "standard" Coherence POF user types -->
<include>coherence-pof-config.xml</include>
<user-type>
<type-id>1165</type-id>
<class-name>com.coherence.poc.domain.RiskTrade</class-name>
<serializer>
<class-name>com.coherence.poc.serializer.RiskTradeSerializer</class-name>
</serializer>
</user-type>
暂无答案!
目前还没有任何答案,快来回答吧!