JMX与websphere建立连接过程抛出IOException?

藍色的海 发布于 2012/06/26 17:07
阅读 1K+
收藏 0

【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”

JMX与websphere建立连接过程抛出IOException

请各位帮我看看是什么原因:

连接方法如下:

public void createJMXConnector(){
		String host="localhost";
		String port="2310";
		String jndiPath="/jndi/JMXConnector";
		 //Hashtable h  = new Hashtable();

        try{
		JMXServiceURL serviceURL=new JMXServiceURL("service:jmx:iiop://"+host+":"+port+jndiPath);
		jmxConnector=JMXConnectorFactory.connect(serviceURL);
		msCon=jmxConnector.getMBeanServerConnection();
		System.out.println("Connected to DeploymentManager");
		}catch(SecurityException e){
			System.out.println("SecurityException="+e.getMessage());
		}
        catch(IOException e){
			System.out.println("IOException="+e.getMessage());
		}
        catch(Exception e){
			System.out.println(e.getMessage());
		}
		
	}

抛出异常如下:

IOException=Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: Context: MZ9WJAENVT3WIL9Node01Cell/nodes/MZ9WJAENVT3WIL9Node01/servers/server1, name: JMXConnector: First component in name JMXConnector not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

加载中
0
宇宙无敌大逗比9
宇宙无敌大逗比9

不知道您实现了没有,我最近做这个也遇到了问题

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部