Description
Code:
CacheTransactionManager cacheTransactionManager = cache.getCacheTransactionManager(); QueryService localQueryService = ((ClientCache) this.cache).getLocalQueryService(); cacheTransactionManager.begin(); Query query = queryService.newQuery(QUERY_STRING); SelectResults results = (SelectResults) query.execute(PARAMETERS); cacheTransactionManager.commit();
Exception:
Exception in thread "main" java.lang.ClassCastException: org.apache.geode.internal.cache.EntrySnapshot cannot be cast to org.apache.geode.internal.cache.LocalRegion$NonTXEntry at org.apache.geode.internal.cache.EntriesSet$EntriesIterator.moveNext(EntriesSet.java:179) at org.apache.geode.internal.cache.EntriesSet$EntriesIterator.<init>(EntriesSet.java:118) at org.apache.geode.internal.cache.EntriesSet.iterator(EntriesSet.java:83) at org.apache.geode.cache.query.internal.ResultsCollectionWrapper.iterator(ResultsCollectionWrapper.java:183) at org.apache.geode.cache.query.internal.QRegion.iterator(QRegion.java:243) at org.apache.geode.cache.query.internal.CompiledSelect.doNestedIterations(CompiledSelect.java:848) at org.apache.geode.cache.query.internal.CompiledSelect.doIterationEvaluate(CompiledSelect.java:715) at org.apache.geode.cache.query.internal.CompiledSelect.evaluate(CompiledSelect.java:553) at org.apache.geode.cache.query.internal.CompiledSelect.evaluate(CompiledSelect.java:57) at org.apache.geode.cache.query.internal.DefaultQuery.executeUsingContext(DefaultQuery.java:582) at org.apache.geode.cache.query.internal.DefaultQuery.execute(DefaultQuery.java:391)