How to Disable the Exception Stack Trace in a WebLogic Scripting Tool (WLST) Python Script

(Doc ID 1316108.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3 and later   [Release: and later ]
Information in this document applies to any platform.


This document describes how to disable an exception stack trace from writing out to the screen from a WebLogic Scripting Tool (WLST) Python script file. A small demonstration is provided to show how the parameter works.

A Python script file, with try/catch code implemented, will display a stack trace to the screen when the script is executed with WLST.

Here is an example. The script file is using an invalid password:

   print "Successfully connected"
  print "Error while trying to connect!!!"

Execute the script file as follows, and observe the output shown:

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://localhost:7001 with userid weblogic ...
This Exception occurred at Fri Apr 22 05:34:13 IST 2011.
javax.naming.AuthenticationException [Root exception is java.lang.SecurityExcept
ion: User: weblogic, failed to be authenticated.]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(Exceptio
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLIni
at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialCo
at Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
Error while trying to connect!!!

Exiting WebLogic Scripting Tool.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms