在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/Java  Linux  HTML/ Web Service調(diào)用WebLogic Server MBean失敗。

Web Service調(diào)用WebLogic Server MBean失敗。

問(wèn)題描述

調(diào)用Web Service時(shí)出現(xiàn)錯(cuò)誤:

Client received SOAP Fault from server : Failed to retrieve RMIServer stub: javax.naming.NoPermissionException: User <anonymous> does not have permission on weblogic.management.mbeanservers to perform lookup operation.

問(wèn)題出現(xiàn)的環(huán)境背景及自己嘗試過(guò)哪些方法

參考How it’s done: Password change functionality in OBIEE
Weblogic域安全屬性“啟用匿名管理員查找”已打鉤。
相關(guān)服務(wù)器協(xié)議IIOP屬性“啟用 IIOP”已打鉤。IIOP登錄用戶名密碼已設(shè)置。
本地測(cè)試和直接部署測(cè)試都是遇到這個(gè)錯(cuò)誤。

你期待的結(jié)果是什么?實(shí)際看到的錯(cuò)誤信息又是什么?

是不是Weblogic還需要做額外的設(shè)置?

回答
編輯回答
臭榴蓮

修改初始化連接方法:

    public static void InlCctn(String Adr, String AdrUsr, String AdrPswd) throws IOException, MalformedURLException {
        JMXServiceURL SvcUrl =
            new JMXServiceURL("service:jmx:iiop://" + Adr + "/jndi/weblogic.management.mbeanservers.domainruntime");
        Hashtable h = new Hashtable();
        h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
        h.put(Context.SECURITY_PRINCIPAL, AdrUsr);
        h.put(Context.SECURITY_CREDENTIALS, AdrPswd);
        cctor = JMXConnectorFactory.connect(SvcUrl, h);
        mbsc = cctor.getMBeanServerConnection();
    }
2017年3月11日 09:49