Closed vaadin-bot closed 8 years ago
Originally by johannes.tuikkala on 2016-01-13 16:28:17 +0200
Attachment added: vaadin-demo.zip
(29.2 KiB)
Test application for reproducing the issue
Originally by KLHauser on 2016-02-12 12:26:06 +0200
I have updated the SpringUIProvider (see here https://github.com/khauser/microservices4vaadin/tree/master/microservices/frontend/src/main/java/com/vaadin/spring/server) and amazingly it works now ;). But now the UIDL-POSTs fail in line "UI uI = session.getService().findUI(request);" in "com.vaadin.server.communication.UidlRequestHandler" because the uIs-map it VaadinSession is empty.
Do you have any hint how to also come over this issue?
Originally by mthomas on 2016-05-10 16:30:12 +0300
I also faced this issue today when tying to setup vaadin session clustering on AWS using DynamoDB. This issue has to be fixed for session clustering to work correctly. Please fix asap! For the record, I'm using Vaadin 7.6.5
Originally by KLHauser on 2016-06-28 19:05:17 +0300
After some time now I was also able to come around the UIDL-POST failures by updating the VaadinSession (containing the right UI/s) stored in Redis. For this I just updated the saveDelta-function in the package org.springframework.session.data.redis.RedisOperationsSessionRepository.
But that's just a workaround.. For me it seems there's some kind of bug in the vaadin-spring-session connection where VaadinSession is not updated after it gets it UIs (in UIInitHandler).
Originally by KLHauser on 2016-07-21 19:09:15 +0300
There is now a pull request: https://github.com/vaadin/spring/pull/32
With jdal's SerializableProxy I was able to come around all other deserialization problems I had.
Originally by Artur- on 2016-08-31 14:45:52 +0300
Fixing this might be easiest by implementing #12501 so that UIProviders could listen to session activation, and in the activation event listener lookup the spring context
Originally by Artur- on 2016-09-01 09:49:23 +0300
Simple fix in https://dev.vaadin.com/review/#/c/14303
Originally by KLHauser on 2016-09-06 22:41:15 +0300
SpringUIProvider okay but there is also a SpringViewProvider:
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
- field (class "com.vaadin.spring.navigator.SpringViewProvider", name: "applicationContext", type: "interface org.springframework.context.ApplicationContext")
- object (class "com.vaadin.spring.navigator.SpringViewProvider", com.vaadin.spring.navigator.SpringViewProvider@55074169)
Could an analog fix also be applied there?
Originally by Artur- on 2016-09-07 11:17:51 +0300
Tracked in https://github.com/vaadin/spring/issues/35
SpringUIProvider's applicationContext field is not serializable too because it holds a reference to the servletContext
Hello @jorginius , very nice catch and that has actually been just fixed with https://github.com/vaadin/spring/commit/47e2ac24a73005d7a15f296e1ea5b1dffc9374a0 and is included in 1.1.1 released today.
remove from the views any @autowire reference to the spring context
Originally by johannes.tuikkala on 2016-01-13 09:02:40 +0200
Discussion from Skype: [13/01/16 08:48:42] Johannes Tuikkala: It seem like that this is the culbrit for the serialization issue in hte SpringUIProvider private final WebApplicationContext webApplicationContext; [13/01/16 08:50:19] Leif Åstrand: The solution in that case is most likely to make the field transient and non-final and add a custom private void readObject(java.io.ObjectInputStream stream) method that restores the WebApplicationContext reference from somewhere [13/01/16 08:52:44] Leif Åstrand: There might also be other classes that hold references to WebApplicationContext or some other non-serializable spring class. Those will show up one after the other as you fix the previous one :)
Related ticket: #18164
Related StackOverflow thread: http://stackoverflow.com/questions/29388542/notserializableexception-on-serialization-of-objects-currently-shown-by-vaadin
I will try to make a test application for this, where this is easily reproducible.
Imported from https://dev.vaadin.com/ issue #19462