Quantcast
Channel: WebSphere Blog by Steve Robinson » WebSphere Jython Examples
Viewing all articles
Browse latest Browse all 10

syntaxError: Lexical error at line

$
0
0

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


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom