Servlet Version in WebSphere Liberty Profile | Generated by AI

Home PDF

Understanding the Error

The error message from console.log indicates a DDParser ParseException related to the web-fragment.xml file in the spring-web-6.2.3.jar. Specifically, it states that the deployment descriptor specifies version “50” (which corresponds to Servlet 5.0), but the WebSphere Liberty Profile (WLP) server is currently provisioned with version “40” (Servlet 4.0). This mismatch occurs because:

To fix this, you need to align the Servlet version supported by WLP with the version required by your application. The recommended solution is to update WLP to support Servlet 5.0 by enabling the jakartaee-9.1 feature.


Solution: Update WLP to Support Servlet 5.0

Here’s how to fix the issue by updating WLP to use the jakartaee-9.1 feature, which includes support for Servlet 5.0:

1. Locate the server.xml File

2. Edit the server.xml File

3. Apply Changes in WLP Development Mode (If Applicable)

4. Verify the Fix


Alternative Solution: Downgrade Spring Boot

If updating WLP to jakartaee-9.1 is not an option (e.g., due to compatibility constraints with other applications), you can downgrade your Spring Boot application to a version compatible with Servlet 4.0:

1. Switch to Spring Boot 2.7.x

2. Rebuild and Redeploy


Summary

The preferred solution (updating WLP) ensures your application can use the latest features of Spring Boot 3.x and Jakarta EE 9. Follow the steps above to resolve the issue and deploy your application successfully.


Back 2025.02.26 Donate