Bonjour,

je me retrouve avec un bug dans un code Jython concernant WebSphere Application Server 7.

Ce code sert normalement à lister tous les objets WAS d'une cellule.

Par contre en ligne : clusterName = AdminConfig.showAttribute(serv, "clusterName" ) j'ai l'erreur :
----------------------------------------------------------------------------------------------
WASX7209I: Connected to process "dmgr" on node ax0518svc1aManager using SOAP connector; The type of process is: DeploymentManager
WASX7017E: Exception received while running file "/APPLICATIONS/COMMON/MIDDLEWARE/ExtractWAS/RAP/exe/essai2.jy"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  (no code object) at line 0
  File "<string>", line 38
                                        clusterName = AdminConfig.showAttribute(serv, "name" )
                                        ^
SyntaxError: invalid syntax
Voici le code (une partie) si quelqu'un peut me diriger oü se situe l'erreur.
Merci à vous
----------------------------------------------------------------------

Code python : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#----------------------------------------------------------------
# Display status info
#----------------------------------------------------------------
def displayStatusFunc (  ):
        #----------------------------------------------------------------
        # Find all the cell and process them one at a time
        #----------------------------------------------------------------
        cells = AdminConfig.list("Cell" )
        cells = wsadminToList(cells)
        for cell in cells:
                #-----------------------------------------------------------------------
                # Find all the nodes belonging to the cell and
                # process them at a time
                #-----------------------------------------------------------------------
                nodes = AdminConfig.list("Node", cell )
                nodes = wsadminToList(nodes)
                print ""
                print "Server STATE PID AppServer Applications"
                print "====== ===== === ========= ============"
                for node in nodes:
                        #--------------------------------------------------------------
                        # Find all the running servers belonging to the cell
                        # and node, and process them one at a time
                        #--------------------------------------------------------------
                        cname = AdminConfig.showAttribute(cell, "name" )
                        nname = AdminConfig.showAttribute(node, "name" )
                        servs = AdminConfig.list("Server", node )
                        servs = wsadminToList(servs)
                        for serv in servs:
                                #---------------------------------------------------------
                                # Get some attributes from the server to display;
                                # invoke an operation on the server JVM to display a property.
                                #---------------------------------------------------------
                                sname = AdminConfig.showAttribute(serv, "name" )
                                server = AdminControl.queryNames("type=Server,cell="+cname+",node="+nname+",process="+sname+",*" )
                                if (len(server) == 0):
                                # Get Cluster Name
                                clusterName = AdminConfig.showAttribute(serv, "clusterName" )
                                if (len(clusterName) !=0):
                                        variableSubstitutionEntries = AdminConfig.getid("/ServerCluster:"+clusterName+"/VariableMap:/VariableSubstitutionEntry:/")
                                        if (len(variableSubstitutionEntries) != 0):
                                                variableSubstitutionEntries = wsadminToList(variableSubstitutionEntries)
                                                for variableSubstitutionEntry in variableSubstitutionEntries:
                                                        varName1 = AdminConfig.showAttribute(variableSubstitutionEntry, "symbolicName" )
                                                        # Check if it is a active cluster of two cells
                                                        if (cmp(varName1, "ACTIVE_CLUSTER") == 0):
                                                                activeClusterState = AdminConfig.showAttribute(variableSubstitutionEntry, "value" )
                                                                break
                                                        #endIf
                                                #endFor
                                        else:
                                                activeClusterState = "true"