Troubleshooting
Problem
A Jython script, with an import command, works only if you have the respective module in the same directory.
Symptom
In this command, wsadmin.sh -f /scirpts/jython/jvm.py, the jmv.py file contains the following line:
import common
The term "common" is nothing but a sample Jython script called common.py.
The only way to get this to work is to run the wsadmin command from the exact directory that common.py exists in. Otherwise, it fails with the following exception:
WASX7209I: Connected to process "dmgr" on node manager using SOAP connector; The type of process is: DeploymentManager
WASX7017E: Exception received while running file "/scripts/61/jython/jvm.py";
exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last): File "<string>", line 26, in ?
ImportError: no module named common
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
03 March 2025
UID
swg21268538