Properties props = new Properties();
props.put("host", "host1");
props.put("port", "8886");
props.put("type", AdminClient.CONNECTOR_TYPE_SOAP);
props.put(AdminClient.USERNAME, "wasadmin");
props.put("user", "wasadmin");
props.put("password", "wasadmin");
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
props.setProperty("javax.net.ssl.trustStore","./file/DummyClientTrustFile_host1.jks");
props.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
props.setProperty("javax.net.ssl.keyStore","./file/DummyClientKeyFile_host1.jks");
props.setProperty("javax.net.ssl.keyStorePassword", "WebAS");
Adminclient ac = AdminClientFactory.createAdminClient(props);
Properties pp = new Properties();
pp.put("host", "host2");
pp.put("port", "8879");
pp.put("type", AdminClient.CONNECTOR_TYPE_SOAP);
pp.put(AdminClient.USERNAME, "wasadmin");
pp.put("user", "wasadmin");
pp.put("password", "wasadmin");
pp.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
pp.setProperty("javax.net.ssl.trustStore","./file/DummyClientTrustFile_host2.jks");
pp.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
pp.setProperty("javax.net.ssl.keyStore","./file/DummyClientKeyFile_host2.jks");
pp.setProperty("javax.net.ssl.keyStorePassword", "WebAS");
Adminclient acl = AdminClientFactory.createAdminClient(pp);
第一个adminclient(ac)可以正常创建,但创建第二个(acl)时报错:
WARNING: ADMC0046W
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed
顶起来
你好,请问有完整的jmxapi部署应用到was的例子么
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。