We have a web application with Vaadin 8, Spring Boot 2.1.3 and Open Feign.
Now Hazelcast should be integrated for session replication. I was following this article.
The Problem: with Open Feign an exception is thrown in the InvocationHandler
: NotSerializableException
, so I implemented my own InvocationHandlerFactory
setting my own InvocationHandler
that is implementing the Serializable
interface.
Now in the InvocationHandler
the same exception is thrown:
com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'org.springframework.session.MapSession'**
com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'org.springframework.session.MapSession'
Caused by: java.io.NotSerializableException: java.lang.reflect.Method
The problem is: java.io.NotSerializableException: java.lang.reflect.Method
Method is final so it cannot be made serializable.
Is there a way to tell Hazelcast not to try to serialize certain classes? Any workaround?
I already tried to use the ApplicationContext
to avoid serialization of open feign classes but it´s not possible because the open feign clients need to be session scoped.