Spring Session Serializable

I tried to follow the instruction from this article https://vaadin.com/blog/microservices-high-availability but instead of using Hazelcast I used Redis.

The setup is ok, but now I have a lot of not serializable Exceptions. Every class instantiated in the view is throwing a not serializable exception. I would understand that it needs to be serializable but when I deployed normally without Spring Session it didn’t throw any exception.

What is troubling me more, is that even lambda in the view is throwing exception. Do you have any idea why it’s doing it ?

Example of lambda throwing exception

Exception Processing ErrorPage[errorCode=0, location=/error]

org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: com.company.app.time.ui.view.ApprovalView$$Lambda$559/1150230335
at org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.serialize(JdkSerializationRedisSerializer.java:96)
at org.springframework.data.redis.core.AbstractOperations.rawHashValue(AbstractOperations.java:184)
at org.springframework.data.redis.core.DefaultHashOperations.putAll(DefaultHashOperations.java:133)
at org.springframework.data.redis.core.DefaultBoundHashOperations.putAll(DefaultBoundHashOperations.java:136)
at org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.saveDelta(RedisOperationsSessionRepository.java:776)
at org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.access$000(RedisOperationsSessionRepository.java:649)
at org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:384)
at org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:245)
at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.commitSession(SessionRepositoryFilter.java:234)
at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.acc

Did you ever find the problem?