"; exception information: com.ibm.bsf.BSFException: exception from Jython:" />

Date Created: Thu 19-Feb-2009

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


Problem 1:

WASX7017E: Exception received while running file "listServer.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 40
print "sname
^
SyntaxError: Lexical error at line 40, column 21. Encountered: "\n" (10), after : ""

Solution:

Code was

print "sname

Should have been

print sname




------------------
Problem 2

WASX7017E: Exception received while running file "listServer.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 41
nname = aServer[aServer.find("nodes/")+6:aServer.find("servers/")-1]
^
SyntaxError: inconsistent dedent

Solution:

There spaces being used as indents before the word "nname" as opposed to tabs which was used before "print sname", so jython gest all upset as it likes consistent indentation. Best to use Application Server Toolkit or an editor that shows spaces/tabs.

print sname
nname = aServer[aServer.find("nodes/")+6:aServer.find("servers/")-1]
print "Node name="+nname+"\n"

Changed all lines to use tab as opposed to some with spaces an some with tabs. It all depends on each editor you use and whether tabs are converted to spaces or are left as tab characters.

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


  • Linked In
  • Twitter
  • About Me
  • My Blog
  • Contact Me

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories