访问Weblogic管理实体遇到weblogic.management.NoAccessRuntimeException。

问题描述

访问weblogic.management.mbeanservers.domainruntime失败:

weblogic.management.NoAccessRuntimeException: [Management:141102]Subject: principals=[] does not have access to perform Admin actions.

问题出现的环境背景及自己尝试过哪些方法

参考How it’s done: Password change functionality in OBIEE

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)
初始化连接方法如下:

    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);
        //        String[] credentials = new String[] { AdrUsr, AdrPswd };
        //        h.put("jmx.remote.credentials", credentials);
        cctor = JMXConnectorFactory.connect(SvcUrl, h);
        mbsc = cctor.getMBeanServerConnection();
    }

用了两种方式连接都是同样的报错。

期待

到底是Weblogic配置问题,还是我方法的问题?

阅读 4.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题