Inconsistent encoding when running IBM Java 21
search cancel

Inconsistent encoding when running IBM Java 21

book

Article ID: 436891

calendar_today

Updated On:

Products

Common Components and Services for z/OS

Issue/Introduction

  • Prior to Java 21, all output in //STDOUT and //STDERR was displayed correctly using the original CCS Tomcat configuration with -Dfile.encoding=ISO8859-1 included in the TOMENVPR file

  • After upgrading to Java 21 inconsistent encoding may be witnessed in //STDOUT and //STDERR output logs.

    • Beginning with Java 21.0.1 and spanning 21.0.7 the output in //STDERR started to display "garbled". As a result CCS 15.0 PTF LU16790 was published to correct the encoding. This was done by adding the Tomcat default logging.properties file to the CCS Tomcat configuration.

    • Jumping ahead to Java 21.0.8 thru 21.0.10.0, the problem resurfaces even when running with the previously mentioned CCS 15.0 PTF.

      • Both //STDOUT and //STDERR are garbled across nearly all logger frameworks used by product applications as well as the Tomcat server itself.
        • Java 21.0.8: Unable to identify any configuration changes or workarounds to resolve.
        • Java 21.0.9 and 21.0.10.0: Adding -Dconsole.encoding=ISO8859-1 to the region's configuration may work.

Environment

Product: Common Components and Services for z/OS

Component: CCS Tomcat

Release: 15.0 with PTF LU16790 (Java 21 Support)

Resolution

Upgrade to IBM Java 21.0.10.1 which should establish the output charset and resolve any witnessed encoding inconsistencies.

This current release of Java appears to change behavior back to how things were with Java 21.0.1 thru 21.0.7. This requires CCS 15.0 PTF LU16790

In conclusion, Java 21 users experiencing the issue should upgrade to the latest Java 21 build. The runtime Java version can be verified in //SYSOUT DD from the joblog.

Additional Information

Broadcom support will review future Java releases for supportability. This article will be updated on an as needed basis.