Hazelcast Spring Cache - SimpleKey serialization

416 views
Skip to first unread message

miloss....@gmail.com

unread,
Feb 20, 2020, 11:43:51 AM2/20/20
to Hazelcast
Hello.

We are using Hazelcast as Spring cache manager in client-server configuration. For some methods where parameters are more complex Spring uses this class: org.springframework.cache.interceptor.SimpleKey
It naturally leads to exception:  com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKey

I would like to ask what is the best approach in this scenario. Is there better solution apart from extending server image with whole Spring core ?

Thank you for your response.

Best regards,
Milos.

Mesut Celik

unread,
Feb 22, 2020, 12:53:15 AM2/22/20
to haze...@googlegroups.com
Hi Miloss,

I haven't seen this error before. 
I suggest you to create a GitHub issue with a reproducer. You are definitely right that server classpath should not include Spring Core Classes.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/fb75ef84-9b1c-4b6b-953a-f7500fa4c1b5%40googlegroups.com.


--
Mesut Celik
Integration Team Lead
   hazelcast®
 
 
2 W 5th Ave, Ste 300 | San Mateo, CA 94402 | USA
+1 (408) 896-1625 | hazelcast.com

This message contains confidential information and is intended only for the individuals named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. -Hazelcast

miloss....@gmail.com

unread,
Mar 6, 2020, 6:51:08 AM3/6/20
to Hazelcast
I ended up using custom KeyGenerator. Now it works.

Regards,
Milos.

On Saturday, February 22, 2020 at 6:53:15 AM UTC+1, Mesut Celik wrote:
Hi Miloss,

I haven't seen this error before. 
I suggest you to create a GitHub issue with a reproducer. You are definitely right that server classpath should not include Spring Core Classes.

On Thu, Feb 20, 2020 at 7:43 PM <miloss....@gmail.com> wrote:
Hello.

We are using Hazelcast as Spring cache manager in client-server configuration. For some methods where parameters are more complex Spring uses this class: org.springframework.cache.interceptor.SimpleKey
It naturally leads to exception:  com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKey

I would like to ask what is the best approach in this scenario. Is there better solution apart from extending server image with whole Spring core ?

Thank you for your response.

Best regards,
Milos.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages