我正在尝试建立一个小工具的任务,如1)连接到weblogic管理服务器。2)添加托管服务器。3)将域名注册到nodemanager,等等。
我在eclipse中开始开发,将weblogic\wlserver103\server\lib的所有jar文件添加到我的项目buildpath中。(我不知道wlst嵌入式模式需要哪些jar文件)开发环境的设置没有任何错误。当我尝试运行简单的任务时,比如连接到管理服务器。抛出一个异常,如下所示
Connecting to t3://ksai.domain.simpledevelopers.com:7001 with userid javadev13 ...
The CompatabilityMBeanServer is not initialized properly.
This might happen if the CompatabilityMBeanServer is
disabled via the JMXMBean.
To view the root cause exception use dumpStack()
WLST detected that the RuntimeMBeanServer is not enabled. This
might happen if the RuntimeMBeanServer is disabled via the JMXMBean.
Please ensure that this MBeanServer is enabled. Online WLST cannot
function without this MBeanServer.
Exception in thread "main" Traceback (innermost last):
File "<string>", line 1, in ?
File "<iostream>", line 22, in connect
File "<iostream>", line 618, in raiseWLSTException
WLSTException: Error occured while performing connect : "Cannot connect to WLST."
Use dumpStack() to view the full stacktrace我可以使用相同的用户名和密码从wlst脱机模式执行相同的连接,这是一个变通方法我还尝试将userconfig和userKey安全文件作为连接命令的参数。
注意:管理服务器已经启动并正在运行。
发布于 2012-09-12 14:50:46
可以尝试的几件事:
1-将CompatibilityMBeanServerEnabled设置为true,从命令行wlst执行以下步骤(用您的设置替换用户名、密码、主机名、adminport、DomainName )
connect('username','password','t3://hostname:adminport')
cd('JMX/DomainName')
ls()现在检查"CompatibilityMBeanServerEnabled“参数的值,如果为假,则执行以下操作
edit()
startEdit()
set('CompatibilityMBeanServerEnabled', 'true')
save()
activate()
shutdown()现在启动AdminServer,并尝试调用WLST嵌入式代码
2-如果上面的修复不起作用,那么在你的WLST嵌入式代码中添加"dumpStack()“,以获得堆栈跟踪,这将有助于确定根本原因。
3-为了回答你的问题,WLST嵌入模式需要哪个jar,它的weblogic.jar
发布于 2016-08-04 21:26:04
假定您的WLS域位于/oracle/app/oracle/gc_inst/user_projects/domains/GCDomain,中,以下WLST命令在WLS10.3.6上对我有效,并允许我们启用RuntimeMBeanServer:
1)如果禁用,则启用Platform MBean服务器: 1.1。从WLS管理控制台,转到GCDomain > Configuration > General >Advanced1.2。选择Platform MBean Enabled,保存更改并激活更改。1.3。重新启动管理服务器。
2)为GCDomain启用环境变量
cd /oracle/app/oracle/gc_inst/user_projects/domains/GCDomain/bin
source setDomainEnv.sh3)从WLST java weblogic.WLST启动RuntimeMBeanServerEnabled
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> readDomain('/oracle/app/oracle/gc_inst/user_projects/domains/GCDomain')
wls:/offline/GCDomain>cd('JMX/NO_NAME_0')
wls:/offline/GCDomain/JMX/NO_NAME_0>set('PlatformMBeanServerUsed','true')
wls:/offline/GCDomain/JMX/NO_NAME_0>set('PlatformMBeanServerEnabled','true')
wls:/offline/GCDomain/JMX/NO_NAME_0>set('RuntimeMBeanServerEnabled', 'true')
wls:/offline/GCDomain/JMX/NO_NAME_0>updateDomain()
wls:/offline/GCDomain/JMX/NO_NAME_0>closeDomain()
wls:/offline>exit() 希望它也适用于你。
发布于 2021-01-15 23:35:21
已停止节点管理器
终止服务器的java进程
而不是发出
start.sh -c
清除缓存的密码并启动所有服务器。
https://stackoverflow.com/questions/12369972
复制相似问题