【问题标题】:wlstModule connection information lostwlstModule 连接信息丢失
【发布时间】:2011-11-24 06:09:12
【问题描述】:

在 WebLogic 10.3.5.0 版本中使用 wlst 时,我对以下情况感到困惑,希望得到答案。

给定一个标准的 wlst 命令来连接服务器

connect('weblogic','welcome1','t3s://localhost:7002')

它按预期连接到我域中的 AdminServer 并显示以下提示:

Connecting to t3s://localhost:7004 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.

wls:/base_domain/serverConfig>

但是,如果我执行以下命令

import wlstModule as wlst
wlst.connect('weblogic','welcome1','t3s://localhost:7002')

我收到以下回复

Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.

wls:/offline>

我的情况是我有一个用于连接 AdminServer 的通用模块,虽然连接成功,但任何其他需要 serverRuntimeConfig() 等的功能都不起作用,因为它认为它没有连接。

有没有人知道使用第二种连接方法的正确机制以及在使用导入的 wlstModule 时保持连接状态还需要做什么。

【问题讨论】:

  • 如果您找到了解决方案,我想听听。在这里遇到同样的问题。
  • 尝试启动 java org.python.util.jython 并以这种方式进行导入..

标签: weblogic weblogic-10.x weblogic11g wlst


【解决方案1】:

在解决了这个问题之后,我似乎找到了答案。

在你开始使用 java org.python.util.jython 之后,你会得到一个提示。

>>>

在这里你可以做

import wlstModule as wlst

因此你应该一直使用 wlst!

wlst.connect()

a = wlst.cmo.getServers()

print (a)

你好,

萨利乌斯

【讨论】:

  • 是的,我知道这个选项。您会注意到它在上面的示例中使用。它没有解决为什么它仍然认为它处于离线状态。
  • 据我所知,您从 wlst 而不是 jython 开始。如果您导入 wlst 以与 java weblogic.WLST 一起使用,恐怕我还没有让它工作,无论如何都不是交互式的。
猜你喜欢
  • 1970-01-01
  • 2014-02-28
  • 2014-08-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-08-17
  • 2017-12-06
相关资源
最近更新 更多