Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

WAS 6.1 JMX AdminClient.

Posts: 20
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am trying to implement custom AdminClient following examples provided by IBM.
however I am not able to instanciate AdminClient object.
my code looks like this:

I've put files form
C:\Program Files\IBM\WebSphere\AppServer\runtimes\
to my build path, in order to make this thing compile without errors.

my soap.client.props has following settings:

So, if i execute that class I'm getting following exceptions: ADMC0016E: The system cannot create a SOAP connector to connect to host localhost at port 8879.
at My.main(
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
... 1 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status line " 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)
... 7 more

What I would like to do is to be able to access PMI data throug JMX.

Any ideas on what's happening here would be appriciated. Thank you in advance.
Askar Akhmerov
Posts: 20
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved with the sourcecode:

Now conclusion is: Sequrity considered to be enabled if you have checkbox "Enable administrative security" marked in the console.
port number to use: could be viewed in the application server ports list. as SOAP_CONNECTOR_ADDRESS.

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all, thank you, Askar, for these useful information, as I was struggling to understand what was going on. Admins told me there was no SSL when I started coding and hence testing. >_<

Anyway I don't know anything about WebSphere and I haven't been able to sort this out as mention in the sample.
I don't know if I misspelled the file path or if the password is not common or if this Dummy key has been removed from the WAS or else...

I manage to get it work due to this other link:

As I'm in a hurry, I will not investigate further. Now it works fine on my side as well : )

BTW, I'd like to add that the first error is due to this line not being specified (default)
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "false");
No security then = Cannot parse.... but I had some dodgy characters (in my eclipse console) after the quote (6 small squares)

Then I changed this line to: props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
and the error was:
[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: PKIX path building failed: unable to find valid certification path to requested target; targetException=java.lang.IllegalArgumentException:

Then I went to IBM website, via google, and find out how to set the .jks files on my client side and so on...
For the Server certificate, if it is not present on your local machine (client) then use the certificate your browser is using when accessing the WAS console

for instance I ended with these lines:
props.setProperty("", "C:/Program Files/IBM/SDP70/runtimes/base_v61/bin/ClientTrust.jks");
props.setProperty("", "C:/Program Files/IBM/SDP70/runtimes/base_v61/bin/ClientKey.jks");
props.setProperty("", "qpbv6TY7,./");
props.setProperty("", "qpbv6TY7,./");

Once again, thank you Askar, for this useful post.

Could you hold this puppy for a sec? I need to adjust this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic