This does not work with CDI: [2020-04-09T13:42:43.106+0200] [Payara 5.201

This does not work with CDI:

[2020-04-09T13:42:43.106+0200]
[Payara 5.201]
[SEVERE]
[javax.enterprise.system.core]
[tid: _ThreadID=2961 _ThreadName=admin-thread-pool::admin-listener(15)]
[timeMillis: 1586432563106]
[levelValue: 1000]
[[
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: [EMBEDDED_SERVLET]
Inconsistent deployment: A Vaadin @CDIUI class should not contain a nested servlet class (si.bass.namizjeui.presentation.AppUI.Servlet) other than a VaadinCDIServlet. In most cases, an appropriate servlet is auto-deployed.]]

Yes, CDI does its own extension of VaadinServlet so you can only use one or the other. This is not a hugely complicated add-on, though, so it’s probably possible to extend VaadinCDIServlet in a similar way in your local environment (sources can be found in GitHub, see the Links section). I’m afraid I don’t have time to look into it myself right now, I’m just about to start a vacation, but let me know if you can’t get it working.