Endevor Web Services Tomcat output is unreadable using Java 21.0.8 or above version
search cancel

Endevor Web Services Tomcat output is unreadable using Java 21.0.8 or above version

book

Article ID: 434685

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

Endevor Web Services Tomcat output has become unreadable following a new Java 21 installation.

Details of the environment and configuration:

  • Java Version: 21.0.8 or 21.0.9 or 21.0.10
  • PTF Status: Java 21 compatibility PTF LU17385 is installed.
  • Tomcat STDENV Configuration: The following logging manager overrides are present:
    • IJO="$IJO -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
    • IJO="$IJO -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
  • Issue: The Tomcat STDERR/STDOUT DD content is unreadable as it appears to be encoded in ASCII.

Environment

Endevor V19

Cause

With Java version 21.0.8, IBM changed the logging behavior for the JZOS batch launcher.

Resolution

Workaround:

  1. Comment out logging manager override in the STDENV file:
    • #IJO="$IJO -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"      
    • #IJO="$IJO -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
  2. Update $CATALINA_BASE/webapps/EndevorService/WEB-INF/classes/logback.xml. Insert following block after line 9: <charset>IBM-1047</charset>
    • The logback.xml configuration must look as follows:
      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
          <appender name="COLOR" class="ch.qos.logback.core.ConsoleAppender">
              <encoder>
                  <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS,UTC} &lt;%thread&gt; %highlight(%-5level) %cyan(\(%logger{25}\)) %msg%n</pattern>
              </encoder>
          </appender>
          <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
              <encoder>
                  <charset>IBM-1047</charset>
                  <pattern>%d{HH:mm:ss.SSS,UTC} &lt;%thread&gt; %-5level \(%logger{25}\) %msg%n</pattern>
              </encoder>
          </appender>

          <logger name="com.ca.endevor" level="${endevor.log.level:-INFO}"/>
          <logger name="com.ca.ccs.j2z" level="${endevor.log.level:-WARN}"/>

          <!-- <logger name="com.netflix.discovery" level="TRACE"/> -->

          <root level="INFO">
              <appender-ref ref="${log.format:-STDOUT}" />
          </root>
      </configuration>
  3. Recycle Tomcat

 

Note:

Change in Step 2 is not permanent and must be repeated after running the WSTOMINS job.

If you are performing the initial installation for Endevor Web Services, Tomcat must be started first to create EndevorService folder:

  • Run WSTOMINS to install the web services.
  • Start WSTOMSTC to deploy the EndevorService.war file and populate the $CATALINA_BASE/webapps/EndevorService directory.
  • Follow steps 2 through 4 from the above.

 

If you are running multiple web applications on the same Tomcat and experiencing same issue with other applications, you may consider making a global version of the logback.xml file for the Tomcat.

  • Create $CATALINA_BASE/conf/logback.xml with the following content:
    • <configuration>
        <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
          <encoder>
            <charset>IBM-1047</charset>
            <pattern>%d{HH:mm:ss.SSS} &lt;%thread&gt; %-5level \(%logger{10}\) %msg%n</pattern>
          </encoder>
        </appender>
        <root>
          <level value="INFO"/>
          <appender-ref ref="STDOUT"/>
        </root>
      </configuration>
  • Add following line to the STDENV file:
    • IJO="$IJO -Dlogback.configurationFile=${CATALINA_BASE}/conf/logback.xml"

Additional Information

IBM Java 21.0.10.1 appears to have changed logging behavior. 

Workaround for Java 21.0.10.1 after applying Endevor PTF LU17385:

  1. Comment out logging manager override in the STDENV file:
    • #IJO="$IJO -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"      
    • #IJO="$IJO -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
  2. Recycle Tomcat