Closed mvysny closed 1 year ago
Sounds like AbstractMprUIContent
is constructed at AbstractLegacyWrapper:182
when the wrapper itself is attached to V14 UI; however there could be a race condition where MprUIInitHandler
is invoked sooner. Can somebody explain in what scenario this could occur?
Regarding the same classes client side counter parts I have observed some oddness in client side as well https://github.com/vaadin/multiplatform-runtime/issues/56
Also getting similar error, this is happening many many times a day at this point:
[2021-03-16 12:23:55] [crit] java.lang.NullPointerException: MprUIContent has not been initialized for 'b2a541fb-ac40-4f81-bb2a-35c5f2d6a58e' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60
[2021-03-16 12:23:55] [crit] at java.base/java.util.Objects.requireNonNull(Objects.java:334)
[2021-03-16 12:23:55] [crit] at com.vaadin.mpr.core.MprUIInitHandler.synchronizedHandleRequest(MprUIInitHandler.java:62)
[2021-03-16 12:23:55] [crit] at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
[2021-03-16 12:23:55] [crit] at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1435)
[2021-03-16 12:23:55] [crit] at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:380)
[2021-03-16 12:23:55] [crit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
[2021-03-16 12:23:55] [crit] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128)
[2021-03-16 12:23:55] [crit] at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
[2021-03-16 12:23:55] [crit] at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
[2021-03-16 12:23:55] [crit] at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
[2021-03-16 12:23:55] [crit] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
[2021-03-16 12:23:55] [crit] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
[2021-03-16 12:23:55] [crit] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
[2021-03-16 12:23:55] [crit] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
[2021-03-16 12:23:55] [crit] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
[2021-03-16 12:23:55] [crit] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
[2021-03-16 12:23:55] [crit] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[2021-03-16 12:23:55] [crit] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[2021-03-16 12:23:55] [crit] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[2021-03-16 12:23:55] [crit] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[2021-03-16 12:23:55] [crit] at java.base/java.lang.Thread.run(Thread.java:832)```
Hi, I am getting the following error:
SEVERE: Servlet.service() for servlet [com.vaadin.mpr.MprServlet] in context with path [/kfa_webgui] threw exception [com.vaadin.server.ServiceException: java.lang.NullPointerException: MprUIContent has not been initialized for '67068eef-dc41-44dd-9603-2a8279157a41' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60] with root cause
java.lang.NullPointerException: MprUIContent has not been initialized for '67068eef-dc41-44dd-9603-2a8279157a41' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60
at java.util.Objects.requireNonNull(Objects.java:290)
at com.vaadin.mpr.core.MprUIInitHandler.synchronizedHandleRequest(MprUIInitHandler.java:62)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1438)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Hi, Even I got issue with the following versions
Same problem after updating mpr-v8 from 5.0.3 to 5.0.4 with update to vaadin flow 21.0.1.
` 15:35:51,027 ERROR [stderr] (default task-2) java.lang.NullPointerException: MprUIContent has not been initialized for 'ee223455-795d-4799-9508-ac830247ea39' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60
15:35:51,028 ERROR [stderr] (default task-2) at java.base/java.util.Objects.requireNonNull(Objects.java:347)
15:35:51,028 ERROR [stderr] (default task-2) at deployment.eAkteMPR.ear.eakte-plus-web.war//com.vaadin.mpr.core.MprUIInitHandler.synchronizedHandleRequest(MprUIInitHandler.java:59)
`
Problem was reappearing with mpr-v8 5.0.4
Still happening with vaadin 8.14.1 / 14.6.7. Locally it happens all the time.
On production this has happened once in 7 hours...
any updates on this one?
Still happening with vaadin 8.14.1 / 14.6.7. Locally it happens all the time.
I recommend to update to 14.7.5.
In the latest version handling of the attribute name of the object related to this exception was changed. This fix is not included yet in 14.6.7. Note also that you need to update Vaadin 8 version to 8.14.2 due this fix.
Thanks Tatu, I tried but updating vaadin to 14.7.5 causes this issue
@dbenninger Have you tried Vaadin 14.8.2 or newer (where #103 is fixed). Does the NPE in MprUIInitHandler.synchronizeHandlerRequest
still occur? We were unable to reproduce this problem.
Closing, please comment here if you can still reproduce the problem and we will re-open the ticket.
With:
vaadin.version = 14.10.7 vaadin-flow-version = 2.9.8 vaadin7.version = 7.7.40 And obviously running MPR Getting the following at random intervals in our Tomcat log. I do note that there is a call to one of our classes that implements javax.servlet.Filter (Carma.Log4jPerUserSessionFilter, in case that is not covered in this ticket.)
javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.NullPointerException: MprUIContent has not been initialized for id = '3eba9a74-221f-41af-84d3-265960f46092' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379) ~[vaadin-server-7.7.40.jar:7.7.40]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet-api.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[catalina.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.64]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.64]
at Carma.Log4jPerUserSessionFilter.doFilter(Log4jPerUserSessionFilter.java:64) ~[carma-legacy-20.x.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.64]
at au.com.vaadinutils.servlet.EntityManagerInjectorFilter$1.exec(EntityManagerInjectorFilter.java:34) ~[VaadinUtils-0.2.0.jar:?]
at au.com.vaadinutils.servlet.EntityManagerInjectorFilter$1.exec(EntityManagerInjectorFilter.java:30) ~[VaadinUtils-0.2.0.jar:?]
at au.com.vaadinutils.dao.EntityManagerProvider.setThreadLocalEntityManager(EntityManagerProvider.java:164) ~[VaadinUtils-0.2.0.jar:?]
at au.com.vaadinutils.servlet.EntityManagerInjectorFilter.doFilter(EntityManagerInjectorFilter.java:30) [VaadinUtils-0.2.0.jar:?]
at com.carmacloud.carma.vaadin.ConnectionManagerInjectorFilter.doFilter(ConnectionManagerInjectorFilter.java:20) [classes/:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.64]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [catalina.jar:9.0.64]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:9.0.64]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [catalina.jar:9.0.64]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:9.0.64]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.64]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [catalina.jar:9.0.64]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:9.0.64]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) [catalina.jar:9.0.64]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) [tomcat-coyote.jar:9.0.64]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.64]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) [tomcat-coyote.jar:9.0.64]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1787) [tomcat-coyote.jar:9.0.64]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.64]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:9.0.64]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.64]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.64]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_332]
Caused by: com.vaadin.server.ServiceException: java.lang.NullPointerException: MprUIContent has not been initialized for id = '3eba9a74-221f-41af-84d3-265960f46092' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60
at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1509) ~[vaadin-server-7.7.40.jar:7.7.40]
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1469) ~[vaadin-server-7.7.40.jar:7.7.40]
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:377) ~[vaadin-server-7.7.40.jar:7.7.40]
... 33 more
Caused by: java.lang.NullPointerException: MprUIContent has not been initialized for id = '3eba9a74-221f-41af-84d3-265960f46092' in current session. It should be added when the first LegacyComponent is attached. Please report this to https://github.com/vaadin/multiplatform-runtime/issues/60
at java.util.Objects.requireNonNull(Objects.java:290) ~[?:1.8.0_332]
at com.vaadin.mpr.core.MprUIInitHandler.synchronizedHandleRequest(MprUIInitHandler.java:65) ~[mpr-core-2.2.18.jar:?]
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:34) ~[vaadin-server-7.7.40.jar:7.7.40]
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1457) ~[vaadin-server-7.7.40.jar:7.7.40]
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:377) ~[vaadin-server-7.7.40.jar:7.7.40]
... 33 more
Thanks, Les
@lcorson-carma Have you recompiled the widgetset?
@TatuLund yes, every time we build the project.
@lcorson-carma This exception happens because MPR UI content is not found from the session attribute. The attribute key is set in window.mprUiId and furthermore passed by vaadinBootstrap.js in v-mui request parameter. The parameter is there (you would get other exception if not). This is the connecting logic between the two frameworks. MPR sets up Vaadin 7 UI provider which will also store instance of the legacy UI to this attribute. Now, this does not work if you have your own UI provider in the application. This is mentioned in the limitations section of the MPR documentation.
@TatuLund I don't believe we have our own UI provider. But, there is still a lot of unused legacy code in this project, so I'm guessing there is going to be some issues until I remove it all.
Hi Guys, this is all good from my side now. Found some old servlet code that had found its way back into the project. Removed, no longer seeing that error.
@lcorson-carma thanks for the update. Closing this for now.
Vaadin 8.9.4+14.1.16, MPR 2.0.1. The original bug report is located at https://gitlab.com/mvysny/vaadin14-mpr-gradle-demo/issues/3
When I launch a Gradle-based MPR project in Intellij Ultimate in Tomcat and navigate to http://localhost:8080, the page flickers and there is a NPE in the log. Workaround is to press F5 which reloads the page and everything starts to work properly.
Stacktrace:
Steps to reproduce:
git clone https://gitlab.com/mvysny/vaadin14-mpr-gradle-demo
./gradlew clean vaadinPrepareFrontend assemble