I recently switched some parameters from my main UI and a couple of hardcorded others that were scattered across to code to a web.xml.
My app uses server pushes, so that’s why I have my @Push annotation on tot of my main UI class, even before declaring it.
I noticed that after doing these changes, I’m seeing on the logs a bunch of IllegalStateException exceptions related to asynchronous operations:
at org.apache.catalina.connector.Request.startAsync(Request.java:1673)
java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.
Sometimes a companion text appears with the exception itself. It’s localized, so I’ll try to localize it:
Servlet.service() for servlet [MyAppServlet]
in context with path threw the exception [com.vaadin.server.ServiceException: java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.]
with root cause
I notice one of the parameters I moved from the @WebServlet annotatoin to my web.xml is
<init-param>
<param-name>asyncSupported</param-name>
<param-value>true</param-value>
</init-param>
but I fail to find the meaning of this parameter. What is this for? May it be related to my exceptions?
The only other parameter I changed while doing these modifications was adding a @PreserveOnRefresh, which I wasn’t doing before. Could that be related, also?