Changing the activity.log path with wsadmin and Administrative Console
 Technote (troubleshooting)
 
Problem(Abstract)
The Administrative Console allows you to change the path of the activity.log file and everything works fine. However, the same change made with wsadmin results in an error in the service log when viewing the path. Use the code in the Solution section of this technote to change the path.

Example of script that causes the problem:
set server [$AdminConfig getid /Node:ldxlabinfra2/Server:batchjvm]
set rls [$AdminConfig list RASLoggingService $server]
set logFile [list name /www/batchjvm/logs/activity.log]
set logAttr [list $logFile]
set attr [list [list serviceLog $logAttr]]
$AdminConfig modify $rls $attr
$AdminConfig save

After selecting the "IBM Service log" and clicking the "SHOW DETAILS" tab, you will see a java.lang.NullPointerException displayed in the console. Click error link at the bottom of this page to view the full text of the error.
 
Cause
After running the script described above, the update is successful. However, error 500 and java.lang.NullPointerException is seen after clicking on the show details tab in the administrative console.
 
Resolving the problem

Change the activity.log path using the administrative console by following these steps:
  1. Open the v5.0 administrative console.

  2. Click on Servers.

  3. Select Application Servers.

  4. Select Server1.
    Under section additional properties
    Select Logging and Tracing
    Select IBM Service Logs

  5. The default log file is: $(LOG_ROOT)/activity.log
    Change it to your desired path, outside the install root path.
    For example: /logs/activity.log

  6. Save the setting and synchronize

Change the activity.log path using wsadmin by following the sample script.

The attributes associated with service log config type are missing from the original example scripts. Attributes for any configuration type can be shown with the following command (attributes for serviceLog are shown):

$AdminConfig showattribute $rls serviceLog

The correct and complete script for the given example is:
set server [$AdminConfig getid /Node:ldxlabinfra2/Server:batchjvm]
set rls [$AdminConfig list RASLoggingService $server]
set sl [$AdminConfig showAttribute $rls serviceLog]
set logFile [list name /www/batchjvm/logs/activity.log]
set logAttr [list $logFile]
$AdminConfig modify $sl $logattr
$AdminConfig save

The command that defines sl variable preserves the original values for size and enabled attributes as required by the administrative console. You can change these attributes the same way you would for the name attribute.

 
error.txt
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
PMR 08013
122
000
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Administrative Console (all non-scripting)
Operating system(s): Windows
Software version: 5.0.2.6
Software edition:
Reference #: 1175306
IBM Group: Software Group
Modified date: Jul 27, 2004