back to all blogsSee all blog posts

Jakarta EE 10, MicroProfile 6, and Java SE 20 support in Open Liberty 23.0.0.3

image of author
Michal Broz on Apr 4, 2023
Post available in languages: 日本語 , 简体中文 ,

We’re thrilled to announce the release of Open Liberty 23.0.0.3, one of the biggest releases of the runtime since its debut over 5 years ago! This release includes Jakarta EE 10 Platform, Web Profile, and, for the first time, Core Profile. Many new enhancements are added throughout most of the features that make up the profiles.

MicroProfile 6, which includes Jakarta EE Core Profile 10, also makes its formal debut in the 23.0.0.3 release. It includes the new MicroProfile Telemetry 1.0 feature as well as updates to the Metrics, OpenAPI, and JWT Authentication specifications.

Support for Java SE 20, the latest version as of this writing, is also introduced in the 23.0.0.3 release and provides various new features and changes. Many notable bug fixes are also included in this Open Liberty release.

In Open Liberty 23.0.0.3:

Run your apps using 23.0.0.3

If you’re using Maven, here are the coordinates:

<dependency>
    <groupId>io.openliberty</groupId>
    <artifactId>openliberty-runtime</artifactId>
    <version>23.0.0.3</version>
    <type>zip</type>
</dependency>

Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty', name: 'openliberty-runtime', version: '[23.0.0.3,)'
}

Or if you’re using container images:

FROM icr.io/appcafe/open-liberty

Or take a look at our Downloads page, where we’ve added the Jakarta EE 10 and MicroProfile 6 packages.

Ask a question on Stack Overflow

Jakarta EE 10 Core Profile, Web Profile, and Platform

Jakarta EE 10 Core Profile, Web Profile and Platform are now officially supported in Open Liberty! We’d like to start by thanking all those who provided feedback throughout our various betas.

Jakarta EE 10 marks a major milestone. It is the first Jakarta release to provide updates to the specifications since Java EE 8 in 2017 and, therefore, the first to provide spec updates since the spec was taken over by the Eclipse Foundation. Among the many updates to existing specifications, it also introduces the Core Profile. The Core Profile is aimed at lightweight runtimes, like Open Liberty, that are optimized for running cloud-native Java microservices.

The following specifications make up the Jakarta Platform and the Core and Web profiles:

Jakarta EE Core Profile 10

Specification Updates Liberty Feature Documentation

Context and Dependency Injection 4.0 Lite

New

cdi-4.0

JSON Binding 3.0

Major update

jsonb-3.0

RESTful Web Services 3.1

Minor update

restfulWS-3.1, restfulWSClient-3.1

JSON Processing 2.1

Minor update

jsonp-2.1

Annotations 2.1 & Interceptors 2.1

Minor updates

cdi-4.0

Dependency Injection 2.0

Unchanged

cdi-4.0

Jakarta EE Platform 10

Specification Updates Liberty Feature Documentation

Jakarta EE Web Profile 10

Major update

See previous table

Authorization 2.1

Minor update

appAuthorization-2.1

Activation 2.1

Minor update

Not applicable (see Javadoc)

Batch 2.1

Minor update

batch-2.1

Connectors 2.1

Minor update

connectors-2.1

Mail 2.1

Minor update

mail-2.1

Messaging 3.1

Minor update

messaging-3.1

Enterprise Beans 4.0

No change

enterpriseBeans-4.0

XML Binding 4.0 (optional)

Major update

xmlBinding-4.0

XML Web Services 4.0 (optional)

Major update

xmlWS-4.0

Liberty provides convenience features for running all of the component specifications that are contained in the Jakarta EE 10 Web Profile (webProfile-10.0) and Jakarta EE 10 Platform (jakartaee-10.0). These convenience features enable you to rapidly develop applications using all of the APIs contained in their respective specifications. For Jakarta EE 10 features in the application client, use the jakartaeeClient-10.0 Liberty feature.

To enable the Jakarta EE Platform 10 features, add the jakartaee-10.0 feature to your server.xml file:

  <featureManager>
    <feature>jakartaee-10.0</feature>
  </featureManager>

Alternatively, to enable the Jakarta EE Web Profile 10 features, add the webProfile-10.0 feature to your server.xml file:

  <featureManager>
    <feature>webProfile-10.0</feature>
  </featureManager>

Although no convenience feature exists for the Core Profile, you can enable its equivalent by adding the following features to your server.xml file:

  <featureManager>
    <feature>jsonb-3.0</feature>
    <feature>jsonp-2.1</feature>
    <feature>cdi-4.0</feature>
    <feature>restfulWS-3.1</feature>
  </featureManager>

To run Jakarta EE 10 features on the Application Client Container, add the following entry in your application’s client.xml file:

  <featureManager>
    <feature>jakartaeeClient-10.0</feature>
  </featureManager>

For more information reference:

MicroProfile 6.0

MicroProfile continues to innovate how the industry optimizes Java microservices. The MicroProfile 6.0 release enables applications to use MicroProfile APIs together with Jakarta EE Core Profile 10 along with various other new functions and improvements. The following specifications make up MicroProfile 6.0:

Specification Updates Liberty Feature Documentation

MicroProfile Telemetry 1.0

New

mpTelemetry-1.0

MicroProfile Metrics 5.0

Major update

mpMetrics-5.0

MicroProfile OpenAPI 3.1

Minor update

mpOpenAPI-3.1

MicroProfile JWT Authentication 2.1

Minor update

mpJwt-2.1

MicroProfile Config 3.0

Unchanged

mpConfig-3.0

MicroProfile Health 4.0

Unchanged

mpHealth-4.0

MicroProfile Rest Client 3.0

Unchanged

mpRestClient-3.0

MicroProfile Fault Tolerance 4.0

Unchanged

mpFaultTolerance-4.0

Jakarta EE Core Profile 10

New

See Core Profile table

To enable all the MicroProfile 6 features, add the microProfile-6.0 feature to your server.xml file:

  <featureManager>
    <feature>microProfile-6.0</feature>
  </featureManager>

To find out more, take a look at the MicroProfile 6.0 specification, release, Javadoc, and Differences between MicroProfile 6.0 and 5.0.

Support for Java SE 20

Java 20 includes the following features and changes:

To use Java 20:

  1. Download Java 20.

  2. Obtain the 23.0.0.3 version of Open Liberty.

  3. Edit your Liberty server.env file to point JAVA_HOME to your Java 20 installation.

For more information on Java 20, reference the Java 20 release notes page, API Javadoc page, download page and Java 20 migration guide.

To try out Java 20 preview features in Open Liberty, make sure to compile with --enable-preview and add the same parameter to your jvm.options file.

Notable bugs fixed in this release

We’ve spent some time fixing bugs. The following sections describe just some of the issues resolved in this release. If you’re interested, here’s the full list of bugs fixed in 23.0.0.3.

  • AcmeCA feature with revocation enabled can fail to initialize on certain OS and JDK combinations

    When running with a hybrid JDK for MacOS with IBMJDK8 and the Automatic Certificate Management Environment (ACME) Support 2.0 feature with certification revocation checking enabled, the SSL/TLS endpoint can fail to complete initialization and will not be available for traffic.

    The following NullPointerException is logged in the FFDC, indicating the failure in the initialization flow:

    Exception = java.lang.NullPointerException
    Source = com.ibm.ws.security.acme.internal.AcmeProviderImpl
    probeid = 921
    Stack Dump = java.lang.NullPointerException
    at sun.security.provider.certpath.CertPathHelper.setDateAndTime(CertPathHelper.java:71)
    at sun.security.provider.certpath.RevocationChecker.checkCRLs(RevocationChecker.java:525)
    at sun.security.provider.certpath.RevocationChecker.checkCRLs(RevocationChecker.java:464)
    at sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:393)
    at sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:336)
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:225)
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:145)
    at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:84)
    at java.security.cert.CertPathValidator.validate(CertPathValidator.java:304)
    at com.ibm.ws.security.acme.internal.CertificateRevocationChecker.isRevoked(CertificateRevocationChecker.java:371)
    ....

    This issue has been resolved and the endpoint successfully initializes and is available to service traffic.

  • Fix ClassCastException during the de-serialization of CDI Injected Event

    A passivated (i.e. serializable) bean which has an injected jakarta.enterprise.event.Event (or javax equivalent) will not be properly restored. This can be encountered when session persistence is enabled and session data is serialized and de-serialized from a database. This causes the following FFDC to occur:

    Stack Dump = java.lang.ClassCastException: cannot assign instance of org.jboss.weld.event.EventImpl$SerializationProxy to field org.apache.myfaces.flow.cdi.FlowScopeContextualStorageHolder.flowDestroyedEvent of type jakarta.enterprise.event.Event in instance of org.apache.myfaces.flow.cdi.FlowScopeContextualStorageHolder
            at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2076)
            at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2039)
            at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1293)
            at java.base/java.io.ObjectInputStream.defaultCheckFieldValues(ObjectInputStream.java:2512)

    This issue has been resolved and the CDI event objects is restored without errors.

  • JDBC DB2 values for queryDataSize need to be updated

    When setting the queryDataSize for the DB2 DataSource to valid values for DB2 11.5.7+, the following error occurs:

    [ERROR   ] CWWKG0075E: The value 10452991 is not valid for attribute `queryDataSize` of configuration element dataSource. The validation message was: Value "10452991" is out of range..

    This issue has been resolved and the new queryDataSize range is correctly accepted.

  • Liberty server hangs randomly

    A bug in OpenJ9 can cause the Liberty server to hang due to a deadlock when using JAX-RS. For example:

    2LKMONINUSE      sys_mon_t:0x00007FCE3C16F258 infl_mon_t: 0x00007FCE3C16F2D8:
    3LKMONOBJECT       org/apache/cxf/jaxrs/interceptor/CachedTime@0x00000000FBF1D0C8: Flat locked by "Default Executor-thread-8" (J9VMThread:0x0000000001B4BF00), entry count 1
    3LKWAITERQ            Waiting to enter:
    3LKWAITER                "Default Executor-thread-1" (J9VMThread:0x00000000006EB200)
    3LKWAITER                "Default Executor-thread-3" (J9VMThread:0x0000000000718D00)
    3LKWAITER                "Default Executor-thread-17" (J9VMThread:0x0000000002644B00)
    3LKWAITER                "Default Executor-thread-19" (J9VMThread:0x0000000000346F00)
    3LKWAITER                "Default Executor-thread-20" (J9VMThread:0x0000000000618300)
    3LKWAITER                "Default Executor-thread-29" (J9VMThread:0x0000000002645700)
    3LKWAITER                "Default Executor-thread-30" (J9VMThread:0x0000000002643F00)
    3LKWAITER                "Default Executor-thread-39" (J9VMThread:0x00000000022FF900)
    3LKWAITER                "Default Executor-thread-40" (J9VMThread:0x00000000022DAA00)
    3LKWAITER                "Default Executor-thread-49" (J9VMThread:0x000000000216DE00)
    3LKWAITER                "Default Executor-thread-50" (J9VMThread:0x00000000022FED00)
    3LKWAITER                "Default Executor-thread-59" (J9VMThread:0x0000000001B74900)
    3LKWAITER                "Default Executor-thread-60" (J9VMThread:0x0000000002178F00)
    3LKWAITER                "Default Executor-thread-62" (J9VMThread:0x0000000001B72300)
    
    "Default Executor-thread-8" J9VMThread:0x0000000001B4BF00, omrthread_t:0x00007FCE18012DF0, java/lang/Thread:0x00000000FBF99E78, state:B, prio=5
           (java/lang/Thread getId:0x4C, isDaemon:true)
           com/ibm/ws/classloading/internal/ThreadContextClassLoader(0x0000000086272FF8)
           (native thread ID:0x1A4, native priority:0x5, native policy:UNKNOWN, vmstate:B, vm thread flags:0x00000281)
           (native stack address range from:0x00007FCEA0FF6000, to:0x00007FCEA1036000, size:0x40000)
          CPU usage total: 3.272702139 secs, current category="Application"
    Blocked on: java/lang/StringBuffer@0x00000000FBF99F10 Owned by: "Default Executor-thread-1" (J9VMThread:0x00000000006EB200, java/lang/Thread:0x00000000804DA638)
          Heap bytes allocated since last GC cycle=0 (0x0)
          Java callstack:
              at java/lang/StringBuffer.setLength(Bytecode PC:0(Compiled Code))
                 (entered lock: java/lang/StringBuffer@0x00000000FBF99F10, entry count: 1)
              at org/apache/cxf/jaxrs/interceptor/CachedTime.updateTime(CachedTime.java:86)
              at org/apache/cxf/jaxrs/interceptor/CachedTime.getTimeAsString(CachedTime.java:134)

    This issue has been mitigated in Liberty by removing the usage of SimpleDateFormat from CXF’s CachedTime class and the deadblock no longer occurs.

Get Open Liberty 23.0.0.3 now