Jakarta EE developers are accustomed to the following workflow for kickstarting an application server:

  • download and extract the application server
  • copy the application’s WAR to the server’s auto-deployment directory
  • start the server
  • invoke the application

When deploying a simple REST application (such as my little ping service) to OpenLiberty, you might receive the following error message:

Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /ping

This message could have been caused by a missing Jakarta EE feature in OpenLiberty’s server.xml file, which is auto-generated after the first server start under OPENLIBERTY/usr/servers/defaultServer/. For Jakarta EE to work, it should contain the following:

    <featureManager>
        <feature>jakartaee-8.0</feature>
    </featureManager>

or

    <featureManager>
        <feature>javaee-8.0</feature>
    </featureManager>

If you choose the package named “Jakarta EE 8” on the OpenLiberty download page (as opposed to the package “All GA Features”), this feature will be enabled out-of-the-box.

With this, OpenLiberty is “ready to run a smarter planet”, including Jakarta EE :)