0

Trying to use SpringSession with Redis storage together with my Vaadin App running under SpringBoot. Session works fine with SpringBoot controllers in my app. But when displaying VaadinUI, even a simple one without any @Autowired beans etc, (example below), I'm getting the following 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: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext

I found similar post here NotSerializableException on serialization of objects currently shown by Vaadin but solution doesnt work for me. I found even this Vaadin ticket https://dev.vaadin.com/ticket/19462 but @SerializableProxy has no efect in the simple UI below as there is no @Autowired bean here and error is still there. Any idea how to resolve this? Database (Redis, memcached etc. ) session storage is very important for load balanced solution we try to build.

@SpringUI(path="/simple")
public class SimpleUI extends UI implements Serializable {
    private static final long serialVersionUID = 1L;

    @Override
    protected void init(VaadinRequest request) {

    }
}
Community
  • 1
  • 1
David Marko
  • 2,477
  • 3
  • 27
  • 58

1 Answers1

0

It is a known bug. You need to provide your own SpringUiProvider.

https://dev.vaadin.com/ticket/19462

ssindelar
  • 2,833
  • 1
  • 17
  • 36