Hello,
I'm trying to upgrade Ignite from 1.7.0 to 2.3.0 and I'm getting this
exception:
java.lang.ClassCastException:
com.company.datastore.ignite.model.IgniteFetchItem cannot be cast to
com.company.datastore.ignite.model.IgniteFetchItem.
No other changes were made, just the ignite dependency upgrade.
More context: An ignite cache is used as a work queue, so some items are
added to the cache and some logic should be executed when a new item is
added, for that a local listener is set:
Consumer<Iterable<CacheEntryEvent<? extends String, ? extends
IgniteFetchItem>>> localChangeHandler = (evts) -> {
for (CacheEntryEvent<? extends String, ? extends IgniteFetchItem> e :
evts) {
IgniteFetchItem fi = e.getValue();
...
}
this.continousQuery.setLocalListener(new
CacheEntryListener<>(localChangeHandler));
The problem happens in the call to *IgniteFetchItem fi = e.getValue();*
Also, the class *IgniteFetchItem* contains only serializable fields.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/