How the pass Jython modules to wsadmin tool

1.3k Views Asked by At

I'm using the Websphere 8 Thin Client to connect to my remote WAS instance.

I'm trying to import some Jyton files by passing python.path to wsadmin but it cannot find them. I keep hitting NameError on the Jython class.

C:\MyThinClient>wsadmin -host <ipaddress> -port 8880 -lang jython -javaoption "-Dpython.path=C:/MyThinClient/Jython/"

WASX7209I: Connected to process "server1" on node XYZNode01 using SOAP connector; The type of process is: UnManagedProcess WASX7031I: For help, enter: "print Help.help()" wsadmin>AdminApplication.listApplications() WASX7015E: Exception running command: "AdminApplication.listApplications()"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (innermost last): File "", line 1, in ? NameError: AdminApplication

The path passed contains the AdminApplication.py file. I've tried passing the Jython path with back-slash and forward-slash but no joy. Any ideas?

1

There are 1 best solutions below

0
On

Try with option -Dwsadmin.script.libraries, like below. It worked for me

C:\MyThinClient>wsadmin -host -port 8880 -lang jython -javaoption "-Dwsadmin.script.libraries==C:/MyThinClient/Jython/"