Quantcast
Viewing all articles
Browse latest Browse all 10

syntaxError: Lexical error at line

When running Jython code I get the following error.

C:\scripts>"C:/Program Files/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/wsadmin.bat" -lang jython -f "C:/scripts/gen.py" "c:/scripts/gen.props"
 WASX7209I: Connected to process "server1" on node LW621LX6026649Node01 using SOAP connector;  The type of process is: UnManagedProcess
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "

"
 WASX7017E: Exception received while running file "C:/scripts/gen.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
 Traceback (innermost last):
 (no code object) at line 0
 File "<string>", line 253
 x += indent*3 + "print "@ClassName@: COMPLETED SUCCESSFULLY";
 ^
 SyntaxError: Lexical error at line 253, column 27.  Encountered: "@" (64), after : ""

The solution is simply that the Jython string has an extra ” in the code.

x += indent*3 + ‘print “@ClassName@: Saving configuration after setting new attributes


Viewing all articles
Browse latest Browse all 10

Trending Articles