Hi,
I am trying to create a custom admin client for a stand alone websphere server. Security is turned on for my server.
Websphere Version -> 6.1.0
Security -> Federal Repository
Admin console is secured and it prompts for password. it accepts the windows administrator password. i am trying to use
SOAP connector port available at 8882.
I am able to get the admin client when security is turned off in my server. But when security is turned on i get an error.
My code and the error i get is:
------------------------------------------------------------
CODE
------------------------------------------------------------
java.util.Properties props = new java.util.Properties();
props.setProperty(AdminClient.CONNECTOR_TYPE, "SOAP");
props.setProperty(AdminClient.CONNECTOR_HOST, "blrkec95828d");
props.setProperty(AdminClient.CONNECTOR_PORT, "8882");
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
props.setProperty(AdminClient.USERNAME, "user1");
props.setProperty(AdminClient.PASSWORD, "user24test");
props.setProperty("javax.net.ssl.trustStore", "C:/Program Files/IBM/WebSphere/AppServer2/profiles/AppSrv02/etc/DummyClientTrustFile.jks");
props.setProperty("javax.net.ssl.keyStore", "C:/Program Files/IBM/WebSphere/AppServer2/profiles/AppSrv02/etc/DummyClientKeyFile.jks");
props.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
props.setProperty("javax.net.ssl.keyStorePassword", "WebAS");
try{
acl = AdminClientFactory.createAdminClient(props);
}
catch(Exception ex){
new AdminException(ex).printStackTrace();
}
--------------------------------------------------------------------
ERROR
--------------------------------------------------------------------
Feb 25, 2009 2:05:20 PM com.ibm.websphere.management.AdminClientFactory
WARNING: ADMC0046W
Feb 25, 2009 2:05:20 PM com.ibm.ws.management.connector.interop.JMXClassLoader
WARNING: Could not find tmx4jTransform.jar in null/etc/tmx4jTransform.jar - Interoperability to older versions of WebSphere is disabled
Feb 25, 2009 2:05:21 PM com.ibm.ws.ssl.config.SSLConfigManager
INFO: ssl.disable.url.hostname.verification.CWPKI0027I
Feb 25, 2009 2:05:21 PM com.ibm.ws.ssl.provider.AbstractJSSEProvider
SEVERE: CWPKI0029E: SSL context provider "IBMJSSE2" is not valid. This provider is specified in the SSL configuration alias "DefaultSystemProperties" loaded from SSL configuration file "System Properties". The extended error message is: "no such provider: IBMJSSE2".
com.ibm.websphere.management.exception.AdminException: com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: The system cannot create a SOAP connector to connect to host blrkec95828d at port 8882 with SOAP connector security enabled.
at Test.setAdminClient(Test.java:57)
at Test.main(Test.java:431)
Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: The system cannot create a SOAP connector to connect to host blrkec95828d at port 8882 with SOAP connector security enabled.
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:476)
at Test.setAdminClient(Test.java:49)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:331)
... 2 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.SocketException; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.SocketException]
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:338)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:175)
... 7 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.SocketException; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.SocketException]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:311)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:296)
... 8 more
getAdminClient: exception
java.lang.NullPointerException
at Test.getPerfObject(Test.java:229)
at Test.getStatDescriptor(Test.java:165)
at Test.main(Test.java:441)
Exception java.lang.NullPointerException
-------------------------------------------------------------------------
PLEASE HELP....