When running a Jython script in IBM WebSphere I get the following error

C:\scripts>”C:/Program Files/IBM/WebSphere7/AppServer1/profiles/Dmgr01/bin/wsadmin.bat” -username wasadmin -password wasadmin -lang jython -f “C:/scripts/clusterAndServer_test.py” –clusterName Cluster2 –action start
WASX7209I: Connected to process “dmgr” on node myCellManager01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: “[–clusterName, Cluster2, –action, start]”
WASX7017E: Exception received while running file “C:/scripts/clusterAndServer_test.py”; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File ““, line 173
else
^
SyntaxError: invalid syntax

[/python]

Reason: The reason is the “:” was left out after the else statement

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply