Reputation: 31
While executing below script to monitor my application status i am getting error:-- Script:--
connect('weblogic','weblogic1','t3://localhost:7001')
domainRuntime()
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime')
$s = cmo.getApplicationIds()
print '####### Application ####### Application State\n'
for s1 in s:
cmo.getIntendedState(s1)
print '\n'
Error Message:-- Problem invoking WLST - Traceback (innermost last): (no code object) at line 0 File "C:\Oracle\Middleware\wlserver_10.3\server\bin\dep.py", line 4 s = cmo.getApplicationIds() ^ SyntaxError: invalid syntax
Thanks in Advance.
Upvotes: 0
Views: 4059
Reputation: 1170
Jython uses white space to identify code blocks, so the spaces at the start of line 4 onwards are the problem, it's telling WLST they are children of line 3 which doesn't make sense. You also don't need the '$' sign to denote a variable ...
connect('weblogic','weblogic1','t3://localhost:7001')
domainRuntime()
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime')
s = cmo.getApplicationIds()
print '####### Application ####### Application State\n'
for s1 in s:
print cmo.getIntendedState(s1)
Upvotes: 3