IBM Support

Updates to Log4j 1.x in IBM Content Navigator deployments

Release Notes


Abstract

This content provides information for IBM Content Manager and IBM FileNet P8 Content Platform Engine.

Content

IBM Content Navigator (ICN) and Task Manager (TM) traditional application server and Standalone container deployments remove log4j 1.x and include log4j 2.17.1 starting with these releases.
  • ICN 3.0.11 IF002
  • TM 3.0.11 IF002
  • ICN 3.0.10 IF004
  • TM 3.0.10 IF004
  • ICN 3.0.9 IF008
  • TM 3.0.9 IF008
  • ICN 3.0.7 IF012
  • TM 3.0.7 IF012

In a Cloud Pak for Business Automation environment for Business Automation Navigator (BAN) container deployments, remove log4j 1.x starting with the following releases.

  • BAN 21.0.3 IF005
  • BAN 21.0.2 IF008
To remove Log4j 1.x, an administrator must redeploy IBM Content Navigator. If any of these JAR files remain, it is recommended to remove all Log4j 1.x files from the configuration.
Run Update the FileNet P8 Client Connector Files to remove older versions of Log4j from the IBM Content Navigator deployment. Once Content Navigator is redeployed, older versions of Log4j do not appear on the Content Navigator or Task Manager applications on WebSphere Application Server. To ensure that all older versions of Log4j are removed, inspect and delete these JAR files from these locations.
  • JAR file names
    • log4j-core.jar
    • log4j-api.jar
    • log4j-1.2-api.jar
  • Locations
    • /configure/explodedformat/navigator/WEB-INF/lib
    • /AppServer/profiles//installedApps//navigator.ear/navigator.war/WEB-INF/lib
Keep only the following versions:
  • log4j-1.2-api-2.17.1.jar (Log4j Bridge)
  • log4j-api-2.17.1.jar
  • log4j-core-2.17.1.jar
IBM Content Manager Backward Compatibility Configuration
This information affects IBM Content Manager if the following versions of IBM Content Navigator are in use:
  • IBM Content Navigator 3.0.11 with IFix002 or IFix003
  • IBM Content Navigator 3.0.10 IFix004 or IFix005

Starting in IBM Content Navigator 3.0.12, 3.0.11 IFix004, and 3.0.10 IFix006, IBM Content Navigator embeds the IBM Content Manager 8.7 API that natively supports log4j2. In these and later versions, the workaround described in this section is not needed.

  1. Configure Log4j 2.x for Backward Compatibility

    Create an XML file to configure Log4j 2.x. This action applies a backward compatibility layer with the Log4j Bridge and the IBM Content Manager Logging API.

    The most important settings are to define an appender and the path where the log is generated.

    For example, create a RollingFile appender with the output path set with the fileName attribute. Set the log pattern and the policies for the log.

    The logger can contain name="com.ibm.mm" to match only messages that contain IBM Content Manager messages. Set the level to the preferred setting.

    1.1 Sample Log4j 2.x Configuration: log4j2.xml

    <?xml version="1.0" encoding="UTF-8"?>
    < Configuration status="ALL">
        <Appenders>
            <Console name="LogToConsole" target="SYSTEM_OUT">
                <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
            </Console>
            <RollingFile name="LogToRollingFile" fileName="/<PATH_TO>/log4j2.log" filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
                <PatternLayout>
                    <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
                </PatternLayout>
                <Policies>
                    <TimeBasedTriggeringPolicy />
                    <SizeBasedTriggeringPolicy size="10 MB" />
                </Policies>
            </RollingFile>
        </Appenders>
        <Loggers>
            <!-- avoid duplicated logs with additivity=false -->
            <Logger name="com.ibm.mm" level="debug" additivity="false">
                <AppenderRef ref="LogToRollingFile" />
            </Logger>
            <Root level="error">
                <AppenderRef ref="LogToConsole" />
            </Root>
        </Loggers>
    </Configuration>
  2. Remove CMLOGRELATIVEPATH and Set CMWorkingDirectory in cmbcmenv.properties.

    For CMLOGRELATIVEPATH, set this variable to false or delete it. When set to true, the configuration is unsupported by Log4j Bridge.

    For CMWorkingDirectory, set this variable to the path where the cmblogconfig.properties is located. Ensure that the path is correct.

    2.1 Example of cmbcmenv.properties
    CMRELATIVEPATH=TRUE
    #CMLOGRELATIVEPATH=FALSE
    CMWorkingDirectory=C:\\Progra~1\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\installedApps\\&lt;NODE_CELL&gt;\\navigator.ear\\navigator.war\\WEB-INF\\classes\\connectors
  3. Update cmblogconfig.properties

    Make sure that the log4j.appender.apiAppender is set to the type described in the Log4j 2.x XML configuration.

    For example, in the Log4j 2.x XML sample configuration, there is a <RollingFile /> setting. So we must set the apiAppender to RollingFileAppender.

    log4j.appender.apiAppender=org.apache.log4j.RollingFileAppender

    3.1 Log4j Bridge Compatibility Paths

    Although cmblogconfig.properties provides the option to set a path for the generated logs, the setting is overwritten by the Log4j 2.x configuration. All the paths are to be defined in that configuration file.

    Warning:
    The log4j.appender.apiAppender.File setting does not produce a file!

    The file is not created at the expected location. The logging is redirected, according to the log4j2.xml configuration, and placed in the fileName path.

    An example of a setting that does not produce a log file:

    log4j.appender.apiAppender.File=C:\\Progra~1\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\installedApps\\icn1Node01Cell\\navigator.ear\\navigator.war\\WEB-INF\\classes\\cmlog\\connectors\\${user.name}.dklog.log

  4. Set the JVM Variable to Configure Log4j 2.x.

    By using the WebSphere Application Server, add the log4j.configurationFile setting, which points to the XML configuration.

    • From the WebSphere Application Server console, go to:

      Servers > Server Types > WebSphere Application Servers > Server1 (Your server ID) > Java and Process Management > Process Definition > Java Virtual Machine > Generic JVM Arguments

    Example setting:

    -Dlog4j.configurationFile=file:///C:/log4j2.xml
    -Dlog4j.configurationFile=file:/opt/IBM/log4j2.xml

    Save the configuration and restart the WebSphere Application Server.

    The log file that is defined in the Log4j 2.x configuration contains the relevant logs.

[{"Type":"MASTER","Line of Business":{"code":"LOB18","label":"Miscellaneous LOB"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEUEX","label":"IBM Content Navigator"},"ARM Category":[{"code":"a8m0z0000001gshAAA","label":"ICN->Core->CM8"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.0.7;and future releases"}]

Document Information

Modified date:
09 November 2022

UID

ibm16558800