Posts Tagged ‘WLST’

Unable to start WLST: “Problem invoking WLST – Traceback (most recent call last)”

The above error means that the correct CLASSPATH has not been set in order to start WLST because of environment not being properly set. The same error can occur for other utilities such as weblogic.Deployer, utils.dbping or even weblogic.Server etc. I was using this decrypt weblogic admin password.

Exact Error was as below

$ java weblogic.WLST

Initializing WebLogic Scripting Tool (WLST) ...

Problem invoking WLST - Traceback (most recent call last):
  File "/tmp/", line 3, in <module>
    import os
ImportError: No module named os


The root cause is always the same, Correct environment not being properly Set and hence the required classes are not loaded.
To fix this, set your environment explicitly using

1. Make sure the right environment is set by running the script. This is located under @MW_HOME/wlserver/server/bin

The script needs to be sourced in order to execute the script in the context of the running shell, and have the actual environment of the shell be set. It has to be executed as either ” ./” (notice the extra dot) or “source ./” and then the CLASSPATH can be confirmed in the current shell with the “env” command.

Simply executing the script “./” will only display the output on the screen.

Once the environment is set, I was able to run the java weblogic.WLST successfully

-bash-4.1$ . ./


Your environment has been set.
-bash-4.1$ java weblogic.WLST

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands


Hope this helps.
-Anand M

Categories: WebLogic Tags: ,