1

I try to convert a vaadin 8 project (also using vaadin7 compatibility mode) to vaadin 14. The project use lot of EJB and CDI features.

Due to the quantity of screen to migrate and because the project is constantly enhanced, we decided to run vaadin 14 close to vaadin8.

Right now, I can use my Vaadin 8 with CDI support. url pattern /v8/* mapped by the VaadinCDIServlet. Alos, I can display V14 screen using defaut "/" mapping. I try to add the CDI support to the V14 part using an extension of V14 VaadinCDIServlet. Because it's not possible to define 2 times the same artifact (com.vaadin/vaadin-cdi) in the same maven module (cdi 3.0.0(for v8) and 11.3.0(for v14)) I used maven-shade-plugin to create a new artifact where all com.vaadin.* classes are renamed by com.mycompany.*

In my project, I can now import respectively V8 or V14 annotation or servlet extention. The compilation works fine but when I try to deploy my app into payara5 server, the exception "Exception while loading the app : CDI deployment failure:Enclosing method not found" is raised at the end of the deployment.

Is somebody already get this kind of issue ? Thx

  • Could you please share the full stacktrace of that `Enclosing method not found` exception? – Leif Åstrand Sep 29 '21 at 05:36
  • Also, do you encounter this problem if you only deploy one of the versions with `maven-shade-plugin` applied, or does it only happen when both versions are included in the same application? – Leif Åstrand Sep 29 '21 at 05:51

0 Answers0