The WebsphereConnectionProvider class assumes that
security is turned off. This obviously causes a
connection problem with the default setup for Websphere
5.1's JMX SOAP connector.
I can see you are using the AdminClient to connect. You
should check/set the additional security-related
properties and the connection should work fine.
From the Websphere documentation:
An exmample to make a secure SOAP based AdminClient:
Properties props = new Properties();
props.setProperty(AdminClient.CONNECTOR_HOST, "localhost");
props.setProperty(AdminClient.CONNECTOR_PORT, "8880");
props.setProperty(AdminClient.CONNECTOR_TYPE,
AdminClient.CONNECTOR_TYPE_SOAP);
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED,
"true");
props.setProperty(AdminClient.USERNAME, "test2");
props.setProperty(AdminClient.PASSWORD, "user24test");
props.setProperty("javax.net.ssl.trustStore",
"C:/WebSphere/AppServer/etc/DummyClientTrustFile.jks");
props.setProperty("javax.net.ssl.keyStore",
"C:/WebSphere/AppServer/etc/DummyClientKeyFile.jks");
props.setProperty("javax.net.ssl.trustStorePassword",
"WebAS");
props.setProperty("javax.net.ssl.keyStorePassword",
"WebAS");
AdminClient client =
AdminClientFactory.createAdminClient(props);