IBM Support

Enabling LOG4J loggers on Oracle Weblogic platform after a successful install

Troubleshooting


Problem

After successfully installing TRIRIGA on Weblogic platform the TRIRIGA loggers are not being created and written to. You need to manually enable the LOG4J loggers on Weblogics. Below document explains how this can be done.

Symptom

Configure the logging setting from the TRIRIGA admin console don't do anything. The TRIRIGA log are not being written. You also will see output in the Weblogic logs related to the TRIRIGA application.

Cause


The TRIRIGA installation doesn't automatically configure LOG4J logging on Weblogics platform has to be manually configured after successful installation.

ENABLE LOGGING from install guide, only mentions the following information.

find the line " if NOT "%LOG4J_CONFIG_FILE%"=="' " above that line

set LOG4_CONFIG_FILE=C:\Tririga\config\log4j.xml
"if NOT "%LOG4J_CONFIG_FILE%"=="'


You need to copy over some jar files and enable LOG4J in the Oracle Weblogic console.

Diagnosing The Problem

There should be a startup exception related to LOG4J logging in Weblogic logs.

Resolving The Problem


You need to copy two jar files into your Weblogic domain so that they are added to the classpath at startup of Weblogic. If this still fails you can add the to jar files to the classpath.

1. Download log4.jar

logging.apache.org/log4j/1.2/download.html
NOTE: The URL above will take you to a site outside of IBM. IBM is not responsible for the content at the destination URL.

Eg. Z:\temp\apache-log4j-1.2.17.zip with the file log4j-1.2.17.jar



2. Copy log4.jar into the Weblogic domain lib directory.

Eg: <weblogic_install_dir>\user_projects\domains\<CLIENTDOMAIN>\lib\log4j-1.2.17.jar


3. Copy wllog4j.jar into the Weblogic domain lib directory

Go to WL_HOME/server/lib and copy wllog4j.jar to into DOMAIN_NAME/lib

Eg:

Copy <weblogic_install_dir>\wlserver\server\lib\wllog4j.jar

into

<weblogic_install_dir>\user_projects\domains\<CLIENTDOMAIN>\lib



NOTE: Dweblogic.ext.dirs system property could prevent the jar files being loaded at startup.


4. Log onto Weblogic Console enable Log4J logging

i. Log on to Weblogic admin Console

servername:port/console/login/LoginForm.jsp

ii. Click Environment (Left Panel)
iii. Click Server (Right Panel)
iv. Select Server (example: AdminServer)


v. Click the logging tab

vi. Scroll down to Advanced and click.
vii. Change Logging implementation to Log4J


viii. Save and restart.



After restart you should see that the server.log file is recording and you can alter the logging via the TRIRIGA admin console.

Screen shot of startup of Weblogics and the two LOG4J jars are added to the path dynamically.



If this fails to work. You need to check the setDomainEnv file.

<weblogic_install_dir>\user_projects\domains\<CLIENTDOMAIN>\bin\setDomainEnv.cmd

1. Confirm the lib directory where the jars are located is included in the path.

<weblogic_install_dir>\user_projects\domains\<CLIENTDOMAIN>\lib

2. Add the jars to the classpath

This should overcome the problem if the jars are not dynamically being added.

[{"Product":{"code":"SSHEB3","label":"IBM TRIRIGA Application Platform"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"IBM TRIRIGA Application Platform","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21668699