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

Date Created: Thu 19-Feb-2009

Related Document Categories:


    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.

Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

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

Oracle WebLogic Categories

JBoss Categories

Other Categories