We have develop a custom add on jira, which uses server sent events via async http servlet(servlet-api 3.0.1). It works fine in Jira 7.13.5, but when we upgrade our jira to 8.2.3 the servlet stopped working.
We got a following error message: java.lang.IllegalStateException: One of the plugins in the filter chain does not support async.
Is there any way to use async servlet in Jira 8.x?
We tried to extend our servlet descriptor in the atlassian-plugin.xml with the < async-supported >true< /async-supported > flag, but it’s not resolve the problem.
Atlassian dependencies versions are:
I have the same issue. How can I fix it?
Unfortunately we have not found a satisfactory solution so far, so we are currently using polling if the asynchronous servlet is unavailable.
We achieved partial results with the Atmosphere Framework, but the application server was shut down at high load. Unfortunately, this may be due to a configuration error. Due to lack of time, we are not working on integrating the framework at this time.
Problem solved as follows:
You shouldn’t use async servlets to start j task.
Could you please explain? Are you saying that we should not use Async Servlets at all?
After another full week of searching exhaustively for a real-time protocol alternative, I have now capitulated to rewrite our entire app from using SSE to use polling.
While the Apache Felix platform Jira runs on supports pretty much every technology there is, the Plugin System (in particular the
atlassian-plugin-plugin) that wraps third-party plugins when running in Jira sets the following restrictions:
- Asynchronous Servlets are not supported: they should be possible to configure (there is a mechanism for this in
atlassian-plugin-plugin), but this configuration simply does not work. Right now
atlassian-plugin-plugin intercepts all Servlet calls an throws an exception if
async functionality is used.
- Jersey 2 is not supported. Atlassian adding support for this at one point, but gave up. Only Jersey 1.19 is available. While Jersey 2 supports SSE, Jersey 1 does not.
- WebSockets is not supported. While Tomcat 8.x supports WebSockets (and Jira runs on Tomcat 8), the default
server.xml - file running in Jira 8 does not contain the required configuration for Tomcat 8’s WebSocket-functionality to work.
- Spring MVC/REST cannot be configured (or if it can, I didn’t manage to do it properly). Spring is the foundation for pretty much every SSE alternative I have found so far (Spring WebFlux, Reactor, Reactive Streams, SseEmitter etc.)
Each of the restrictions above can be lifted by manually manipulating the
server.xml files found inside the Jira installation folder. If you are developing plugins for in-house use, this might be the solution for you.
As of 07.08.2020 there does not seem to be any available options for real-time communication when developing for Jira Server 8.5 (LTS). If anyone find something that works, please share!
Environment: Jira 8.5, Java 11