Vaadin shows objects that are requested from the Database via IPC, but when I manipulate the object and want to save it again by serializing it and sending it over to the controller I get the following Exception:
java.io.NotSerializableException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at java.util.LinkedList.writeObject(LinkedList.java:1118)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
...
I tried to:
Request → manipulate → Save | works
Request → show in Vaadin → manipulate in Vaadin-> Save | doesn’t work
Why does the Serializer want to AnnotationConfigEmbeddedWebApplicationContext and is there a workaround? Can I remove it beforehand?
We moved on from Vaadin.
A possible solution was to request the object again and
modify it without showing it in Vaadin and then save it.
Which is dumb, but nothing else worked.
Did anybody come up with a workable solution?
We are facing the same issue with spring Boot 1.5.10, vaadin 8.4.2, hazelcast (session replication) 3.10.2.
thank you