This is my first attempt with WLST (WebLogic Scripting Tool) which is scripting tool to create , manage and monitor webLogic domains, more information here .
You can invoke WLST by running “java weblogic.WLST”
I tried this on my WebLogic Server and straight hit error
Exception in thread “main” java.lang.NoClassDefFoundError: weblogic/WLST
I soon realised that jar file which contains class weblogic.WLST is missing from classpath and quick fix is to set environment variable using setWLSEnv.sh (under WL_HOME/server/bin) . For Fusion MiddleWare (FMW) 11g, it should be under $MW_HOME/ wlserver_10.3/ server/ bin
set environemnt variable for weblogic server
$ java weblogic.WLST
Initializing WebLogic Scripting Tool (WLST) …
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
More on WLST commands coming in next posts but here are some WLST basics
1. WebLogic Scripting Tool (WLST) – is command line scripting tool to create , manage and monitor webLogic domains and resources/applications deployed on WebLogic
2. WLST is based on Jython based scripting language, which in turn is Java implementation of Python.
3. WLST is used
- To automate common tasks
- If administration console is not available or as alternative to Administration Console
4. WLST can be run in offline and online mode
a) online mode> interact with running weblogic server
b) offline mode> servers in domain should be shutdown and WLST updates directly config.xml on file system
5. If you do not supply any script file then WLST runs in interactive mode.
6.You can generate WLST scripts via WebLogic Console as well -> click on Record button on console after clicking ‘Lock and Edit’ button on change center. To end recording click on ‘Activate Changes’
7. WLST communicates with Weblogic’s MBean to retrieve and update resources on a running server.
Related Posts for WLST
- Exception in thread “main” java. lang. NoClassDefFoundError : weblogic/WLST