Creating a Wlst file in Eclipse
Eclipse flag WLST commands with “undefined variable” error if you don't have the following conditional import statement in the beginning of the file:
if __name__ == '__main__':
from wlstModule import * #@UnusedWildImport
Command Help
Jython Interpreter
The Jython Interpreter is installed during the facet configuration.
You will get this configuration (with weblogic.jar):
If you configure your project with the facet
Facet
facet configuration of a project in order to get Wlst support.
Support
An internal error occurred during: “Launching Wlst”
An internal error occurred during: "Launching Wlst wls_create_user.py".
java.lang.NullPointerException
Be sure to start a script that belongs to the WLST source directory.
Undefined variable
When importing existing WLST scripts into OEPE, be aware of the fact that Eclipse may flag WLST commands with “undefined variable” error.
To work around this problem, add following conditional import statement in the beginig of the file:
if __name__ == '__main__':
from wlstModule import *