Search code examples
tomcatjakarta-eejax-rswildflypayara

My Jakarta EE9 project works only on Payara server. Why?


My hello-world "Jakarta EE 9" project, hosted at https://github.com/iubar/hello-jaxrs works only in Payara 5.2021.2 but not in Tomcat 10 nor in Wildfly 23.0. Any ideas ?


Solution

  • Regarding Wildfly 23, there are two versions available (cf. download page):

    • Jakarta EE Full & Web distribution is a full Jakarta EE 8 server. This is basically a rebranding of Java EE 8.
    • WildFly 23 Preview EE 9 is a full Jakarta EE 9 server. Only this version uses the new jakarta.* namespace.

    Regarding Tomcat 10: Tomcat implements only five (Servlet, JSP, EL, Websocket and JASPIC) specification of Jakarta EE 9 (cf. version list). Since the Servlet API interacts with other specifications (e.g. Annotations, JPA and JAX-WS) Tomcat will behave correctly if you add the spec and implementation JARs to the common classpath ($CATALINA_HOME/lib).

    The link to your project is broken, but I guess it uses JAX-RS. Therefore you have two options: