Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

NotSerializableException on vaadin-cdi class

Richard Aalten
8 years ago Apr 25, 2014 10:14am


Were using Vaadin 7.1.5 in combination with vaadin-cdi-1.0.0.alpha and now we're getting NotSerializableExceptions for the following classes:
java.io.NotSerializableException: org.apache.webbeans.component.ManagedBean
java.io.NotSerializableException: com.vaadin.cdi.internal.UIBean

This is caused in our load-balanced environment where the HttpSession is replicated to the other server.
Looking at the message the UIBean and the ManagendBean are not serializable.

The question is however, why are these classes put in the session and who is responsible for doing this ?
Does our setup even work with CDI and session replication ?

We're using the @CDIUI annotation for the Application and the CDIViewProvider. Our views have the @CDIView annotation.

Thank you for your help in advance.

Kind regards,
Richard Aalten