首页 文章

通过Weblogic中的WLST监视应用程序部署状态

提问于
浏览
0

执行下面的脚本来监视我的应用程序状态时,我收到错误: - 脚本: -

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'

错误消息: - 在第0行调用WLST - Traceback(最里面的最后一个):(无代码对象)文件“C:\ Oracle \ Middleware \ wlserver_10.3 \ server \ bin \ dep.py”,第4行s = cmo .getApplicationIds()^ SyntaxError:语法无效

提前致谢 .

1 回答

  • 3

    Jython使用空格来识别代码块,因此第4行开头的空格是问题所在,它告诉WLST它们是第3行的子节点,这是没有意义的 . 你也不需要'$'符号来表示变量......

    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)
    

相关问题