ClassCastException retrieving cached object

classic Classic list List threaded Threaded
3 messages Options
niamin niamin
Reply | Threaded
Open this post in threaded view
|

ClassCastException retrieving cached object

This post was updated on .
Working with Ignite 2.7.6 using spring config from your examples so
peerclassloading is enabled. On my test, I am starting a single server node from IDE. I get ClassCastException retrieving cached
object. Works fine if I set and get cached object as BinaryObject. However,
I am trying to complete a POC using a persistent store table which consists
of a composite primary key and 10+ columns. So BinaryObject model is not
practical to use. Can you help to resolve the issue with loading custom
objects from cache using its type?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException retrieving cached object

Hello!

Key-value classes will not be peer class loaded. You need to deploy them explicitly to classpath of all nodes.

Regards,
--
Ilya Kasnacheev


вс, 6 окт. 2019 г. в 04:09, niamin <[hidden email]>:
Working with Ignite 2.7.6 using spring config from your examples so
peerclassloading is enabled. I get ClassCastException retrieving cached
object. Works fine if I set and get cached object as BinaryObject. However,
I am trying to complete a POC using a persistent store table which consists
of a composite primary key and 10+ columns. So BinaryObject model is not
practical to use. Can you help to resolve the issue with loading custom
objects from cache using its type?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ezhuravlev ezhuravlev
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException retrieving cached object

In reply to this post by niamin
Hi,

Peer class loading doesn't work with model classes, more information regarding use cases for peerClassLoading can be found here: https://www.gridgain.com/docs/latest/developers-guide/peer-class-loading

Evgenii


вс, 6 окт. 2019 г. в 04:09, niamin <[hidden email]>:
Working with Ignite 2.7.6 using spring config from your examples so
peerclassloading is enabled. I get ClassCastException retrieving cached
object. Works fine if I set and get cached object as BinaryObject. However,
I am trying to complete a POC using a persistent store table which consists
of a composite primary key and 10+ columns. So BinaryObject model is not
practical to use. Can you help to resolve the issue with loading custom
objects from cache using its type?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/