Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting an adminClient

26 views
Skip to first unread message

enrico.v...@generalisi.it

unread,
Jun 26, 2006, 10:01:57 AM6/26/06
to
Hello,
i'm trying to get an adminClient using this piece of code:

connectProps.setProperty("type", "SOAP");
connectProps.setProperty("host", "XXXXXXXX");
connectProps.setProperty("port", "8886");
AdminClient adminClient = null;
adminClient = AdminClientFactory.createAdminClient(connectProps);

but i always get an error:

Algorithm SSL not available

What should i look for?

TIA

Sven Vermeulen

unread,
Jun 26, 2006, 12:39:35 PM6/26/06
to
enrico.v...@generalisi.it wrote:
> connectProps.setProperty("type", "SOAP");
> connectProps.setProperty("host", "XXXXXXXX");
> connectProps.setProperty("port", "8886");
> AdminClient adminClient = null;
> adminClient = AdminClientFactory.createAdminClient(connectProps);

Mine is like so:
Properties connectProperties = new Properties();
connectProperties.setProperty(AdminClient.CONNECTOR_TYPE,AdminClient.CONNECTOR_TYPE_SOAP);
connectProperties.setProperty(AdminClient.CONNECTOR_HOST,"XXXXXXXX");
connectProperties.setProperty(AdminClient.CONNECTOR_PORT,"8879");
adminClient = AdminClientFactory.createAdminClient(connectProperties);

Make sure that your SOAP port (8886) really is your SOAP one.

Ben_

unread,
Jun 26, 2006, 1:11:03 PM6/26/06
to
Post a more detailed stracktrace.

Are you sure you're using the WebSphere JDK/JRE to run that piece of code ?


enrico.v...@generalisi.it

unread,
Jun 27, 2006, 2:32:29 AM6/27/06
to
I'll try to be more exhaustive.
The piece of code is running under WSAD 5.1.1.
The server i try to connect has been instrumented by JMX and a custom JMX Console works on it (but i cant access its code!)

In the project classpath the following jars are included:
- jmxri.jar
- jmxtools.jar
- rmissl.jar
- jmxremote_optional.jar
- jmxremote.jar
- other WAS jars (such as jaas.jar, wasjmx.jar, wsexception.jar, admin.jar, ibmjsse-debug.jar, xml.jar)

The Exception is:

java.security.NoSuchAlgorithmException: Algorithm SSL not available
at javax.net.ssl.SSLSecurity.a(SSLSecurity.java:15)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:31)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:23)
at org.apache.soap.util.net.SSLUtils.buildSSLSocket(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.soap.util.net.HTTPUtils.buildSocket(Unknown Source)
at org.apache.soap.util.net.HTTPUtils.post(Unknown Source)
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$2.run(SOAPConnectorClient.java:233)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:230)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:183)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:300)
at it.gsi.jmx.prove.TestSOAP.main(TestSOAP.java:75)
com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: Impossibile creare il connettore SOAP per connettere lhost {0} alla porta {1}
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:354)
at it.gsi.jmx.prove.TestSOAP.main(TestSOAP.java:75)
---- Begin backtrace for nested exception
java.lang.reflect.InvocationTargetException: com.ibm.websphere.management.exception.ConnectorNotAvailableException
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:250)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:183)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:285)
at it.gsi.jmx.prove.TestSOAP.main(TestSOAP.java:75)
---- Begin backtrace for nested exception
[SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status line &quot; &quot;: java.util.NoSuchElementException; targetException=java.lang.IllegalArgumentException: Error parsing HTTP status line " ": java.util.NoSuchElementException]
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$2.run(SOAPConnectorClient.java:233)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:230)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:183)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:285)
at it.gsi.jmx.prove.TestSOAP.main(TestSOAP.java:75)

Hope this will help more.
Thanks for your attention

Ken Hygh

unread,
Jun 27, 2006, 8:55:33 AM6/27/06
to
Sounds like you're not running this in a WebSphere JRE.

Ken

enrico.v...@generalisi.it

unread,
Jul 12, 2006, 10:46:47 AM7/12/06
to
Thx to all,
we did the same thing (same code!) inside a servlet and everything works.

I still cant understand why it didnt work before (inside a "main"), but i'm quite happy to make it work with servlets anyway.

Ben_

unread,
Jul 12, 2006, 11:49:18 AM7/12/06
to
> I still cant understand why it didnt work before (inside a "main")
You didn't answer the questions we asked you, so you didn't help us help
you...


enrico.v...@generalisi.it

unread,
Jul 13, 2006, 2:13:27 AM7/13/06
to
Hi all,
the stacktrace has been posted.
About WebSphere JDK/JRE, i ran the code from within WSAD using the "Run as JAVA aplication", so i thought i was using the correct environment.

Hope this will help more
thanks

Ken Hygh

unread,
Jul 13, 2006, 9:49:25 AM7/13/06
to

I told you why: you weren't running WebSphere's JRE, which has Java2
Security implementations for SSL. Evidently, the eclipse JVM that runs
'main()' by default, does not have SSL installed.

If this doesn't make sense, please get a book on Java2 Security. It's
complex.

Ken

enrico.v...@generalisi.it

unread,
Jul 13, 2006, 10:17:55 AM7/13/06
to
That's the matter i didnt consider :)
I thought that running in the same IDE would imply to use the same JVM but i was wrong.
Next time i'll be more careful (and more documented).
Thx

Ben_

unread,
Jul 17, 2006, 3:33:36 PM7/17/06
to
Apologizes. For some reason, my newsreader or newsserver do not list that
post, but I can see it on Google groups.

As Ken indicated you needed to run the application with an IBM JDK to have
the crypto provider (not only specific jar files but also specific property
files entries are necessary to have the crypto provider available).


0 new messages