Jakarta EE 10 behavior differences
When moving to Jakarta EE 10 in Liberty, there might be some behavior differences in your application because of implementation changes and specification clarifications. Liberty does not require you to move to the next Java EE level and can continue to use the existing Java EE 6, Java EE 7, or Java EE 8 features. If you move to Jakarta EE 10 level, all technologies used by the application must be migrated to the Jakarta EE 10 level.
General Rules
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Jakarta EE 10 general information and potential issues | This rule contains general information for migrating to Jakarta EE 10, as well as information on issues that the WebSphere Migration Toolkit for Application Binaries (binary scanner) does not detect. | jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.MigrationToJakarta10Apis |
Jakarta Contexts and Dependency Injection
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| New qualifier is no longer available | The @New qualifier is no longer available in CDI 4.0. |
No |
| Deprecated APIs have been removed in CDI 4.0 | The Bean.isNullable(), BeanManager.fireEvent(), BeanManager.createInjectionTarget(), and
BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) methods have been removed. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.DeprecatedCDIAPIsRemoved40 |
| Behavior change to bean discovery in modules with beans.xml file with no version specified | In CDI 4.0, any archives with a bean.xml without a specified version are considered implicit bean archives. |
jakarta-ee-10.yml org.openrewrite.java.migrate.BeanDiscovery |
| Behavior change to bean discovery in modules with empty beans.xml file | In CDI 4.0, any archives with an empty bean.xml are considered implicit bean archives. | No |
Jakarta Expression Language
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| The MethodExpression.isParmetersProvided() method is unavailable | Expression Language prior to 5.0 provides the deprecated MethodExpression.isParmetersProvided() method,
with the word 'parameter' misspelled in the method name. This method is unavailable in Jakarta Expression Language 5.0.
Use the correctly spelled MethodExpression.isParametersProvided() method instead. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovedIsParmetersProvidedMethod |
Jakarta Server Faces
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Removed Jakarta Faces Expression Language Classes | Classes in the jakarta.faces.el package have been replaced and removed. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovedJakartaFacesExpressionLanguageClasses |
| Removed Jakarta Faces ResourceResolver class | This rule flags all usage of the jakarta.faces.view.facelets.ResourceResolver and
javax.faces.view.facelets.ResourceResolver classes. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovedJakartaFacesResourceResolver |
| Removed Jakarta Faces StateManager Methods | This rule flags methods that were removed from the jakarta.faces.application.StateManager
and javax.faces.application.StateManager classes. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovedStateManagerMethods |
| Removed Jakarta Faces UIComponent Constants | This rule flags any reference to the jakarta.faces.component.UIComponent.CURRENT_COMPONENT
and CURRENT_COMPOSITE_COMPONENT constants. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovedUIComponentConstant |
| Faces secret key JNDI names have changed | The jsf/ClientSideSecretKey JNDI name has been renamed to faces/ClientSideSecretKey,
and the jsf/FlashSecretKey JNDI name has been renamed to faces/FlashSecretKey. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.FacesJNDINamesChanged |
| Faces JavaScript file and namespace names have changed | The jsf.js JavaScript file used by Faces has been renamed to faces.js. |
No |
| Faces Managed Beans have been removed | The specification for managed beans from Jakarta Server Faces has been placed into its own specifications, namely Jakarta Managed Beans and CDI. All managed beans must be converted to Contexts and Dependency Injection (CDI) beans. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved |
Jakarta JSON Binding
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Check for behavior change when using JsonValue | In JSON Binding 3.0, a class with a JsonValue type field will now deserialize a
JSON null value as JsonValue.NULL rather than Java null. |
No |
Jakarta Server Pages
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| The isThreadSafe directive is no longer recommended | In Jakarta Server Pages 3.1, the isThreadSafe page directive is no longer recommended.
isThreadSafe is implemented differently in JSP 3.1, and it can result in severe performance issues. |
No |
| JSP plugin actions removed in Jakarta Server Pages 3.1 | In Jakarta Server Pages 3.1, the jsp:plugin, jsp:params, and
jsp:fallback JSP file actions are no longer supported. |
No |
Jakarta Mail
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| The com.sun.mail package is unavailable | Previously the com.sun.mail reference implementation package was provided as third-party API by the
JavaMail 1.5, JavaMail 1.6, and Jakarta Mail 2.0 features. The Jakarta Mail specification API has now been split from
the API of the reference implementation. |
No |
Jakarta Persistence
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Check for a behavior change on the ClassTransformer.transform() method | This rule flags references to the jakarta.persistence.spi.ClassTransformer.transform() method. Previously,
this method threw an IllegalClassFormatException, but now it throws a TransformerException. |
No |
Jakarta Servlet
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Deprecated Jakarta Servlet classes and methods have been removed | Jakarta Servlet methods and classes have been removed in Jakarta Servlet 6.0. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovalsServletJakarta10 |
| The implementation was removed for several Jakarta Servlet methods | Several Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265. In addition, the
behavior of these methods has been changed so the setters no longer have any effect, the getComment methods return null,
and the getVersion method returns 0. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.ServletCookieBehaviorChangeRFC6265 |
Jakarta WebSocket
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Check for a behavior change on the Session.getRequestURI() method | This rule flags references to the jakarta.websocket.Session.getRequestURI() method. |
No |
| Check for a behavior change on the EndpointConfig.getUserProperties() method | This rule flags references to the jakarta.websocket.EndpointConfig.getUserProperties(),
jakarta.websocket.server.ServerEndpointConfig.getUserProperties(), and
jakarta.websocket.ClientEndpointConfig.getUserProperties() methods. |
No |
| The WsWsocServerContainer.doUpgrade method is deprecated | The com.ibm.websphere.wsoc.WsWsocServerContainer.doUpgrade(HttpServletRequest, HttpServletResponse,
ServerEndpointConfig, java.util.Map<String,String>) method is deprecated. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.WsWsocServerContainerDeprecation |
Jakarta XML Binding
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| Validator is unavailable | JAXB and XML Binding prior to 4.0 provide the deprecated Validator class.
This class is unavailable in XML Binding 4.0 as on-demand validation is no longer supported. |
No |
RESTful Web Services 3.0
| Rule Name | Rule Description | Automated Fix |
|---|---|---|
| SOAPElementFactory is unavailable | XML Web Services prior to 4.0 provides the deprecated SOAPElementFactory class,
which is removed in XML Web Services 4.0. |
jakarta-ee-10.yml org.openrewrite.java.migrate.jakarta.RemovedSOAPElementFactory |