尝试连接 weblogic 服务器时

问题描述

线程“主线程”中的异常 java.lang.NoClassDefFoundError: weblogic/rmi/extensions/disconnectListener

代码:=

private static void connect() throws Exception {
    
       Hashtable<String,String> h = new Hashtable<String,String>();
       h.put(Context.Security_PRINCIPAL,"weblogic");
       h.put(Context.Security_CREDENTIALS,"password");
       h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");

    JMXServiceURL url = new JMXServiceURL("t3",hostname,7001,"/jndi/weblogic.management.mbeanservers.domainruntime");
    System.out.println("1");
    JMXConnector c = JMXConnectorFactory.connect(url,h);
    System.out.println("2");
    MBeanServerConnection server = c.getMBeanServerConnection();

    System.out.println("Connected.");

  

    // close the connection
    c.close();
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)