com.ibm.bsf.BSFException when running a wsadmin script

This was seen the other day when attempting to execute a Connections script once connected to wsadmin:

wsadmin>execfile(“/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/bin_lc_admin/wikisAdmin.py”)
WASX7015E: Exception running command: “execfile(“/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/bin_lc_admin/wikisAdmin.py”)”

; exception information:
 com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File “<input>”, line 1, in ?
  File “/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/bin_lc_admin/wikisAdmin.py”, line 19, in ?
NameError: java

This is because the default langauge for wsadmin is JACL and the script is JYTHON.

Ensure when starting the wsadmin utility, “-lang jython” is added to the command line.

Advertisements