Redirection of stderr and stdout with Weblogic

0 Likes

Problem:

How can you redirect stderr and stdout when you start weblogic server from DPJ?

Resolution:

You can redirect stderr and stdout when you start weblogic from DPJ. Below instruction is for Weblogic but same step can be followed for any other DPJ supported Application Server also:

1. Once you have a configuration set up for your Application Server using DPJAdmin, DPJ will create xml file and that is located under DPJinstalldirectory\var\agents\userid_dpjadminServers.xml

Name of the xml file will be userid_dpjadminServers.xml

You can see below example for location of that file on windows machine:

D:\Program Files\Compuware\DevPartner Java Edition\var\agents\userid_dpjadminServers.xml

You can see below example for location of that file on Solaris machine:

/opt/Compuware/DPJ/var/agents/root_dpjadminServers.xml

2. Open that xml file in text editor and find the server tag. Below is an example of the Server tag.

server name='WebLogic8_1' serverType='WebLogic8' serverBaseType='GenericExecutable' bootstrapTerminates='false' detachBeforeKill='false' startTimeoutSeconds='60' stopTimeoutSeconds='300' isService='false' stdout='' stderr='' outputToSessionLog='false'>

[ ...snip a bunch of children tags ...]

3. If you insert one more attribute within the server tag, namely redirectOutput='true' as shown:

server name='WebLogic8_1' serverType='WebLogic8' serverBaseType='GenericExecutable' bootstrapTerminates='false' detachBefo

reKill='false' startTimeoutSeconds='60' stopTimeoutSeconds='300' isService='false' redirectOutput='true' stdout='' stderr='' outputT

oSessionLog='false'>

[ ...snip a bunch of children tags ...]

and save the file.

4. Restart NCSP and then start the WebLogic instance from the DPJ GUI, you will get two log files in the /var/opt/Compuware/DPJ/log folder as follows:

SERVER-root_WebLogic8_1-stderr-5-20-2005.log

SERVER-root_WebLogic8_1-stdout-5-20-2005.log

These are the stderr and stdout logs for the 'server' under test.

Old KB# 11170
Comment List
Anonymous
Related Discussions
Recommended