When running a jython script in wsadmin.bat/.sh we get this error: SyntaxError: Lexical error
A common reason is missing “quotes”. As you can see by this error column 35 has an error and a carriage return was found before the end quote. The fix is to add a set of quotes.
Problem code:
print "Entering exception catch
WASX7017E: Exception received while running file "f:\script\jython\getCell.py"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (innermost last): (no code object) at line 0 File "", line 27 print "Entering exception catch ^ SyntaxError: Lexical error at line 27, column 35. Encountered: "\r" (13), after : ""
Solution:
print "Entering exception catch