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

PMI application using JMX

84 views
Skip to first unread message

swa...@hotmail.com

unread,
Jul 4, 2005, 2:31:41 PM7/4/05
to
Hi All,

I am a newbie to WAS and I am trying to write a PMI program sample given by this article "IBM WebSphere Developer Technical Journal: Writing PMI applications using the JMX interface".

http://www-128.ibm.com/developerworks/websphere/techjournal/0402_qiao/0402_qiao.html

What I would like to do is to use the PMI/JMX interface to extract JDBC connection pool settings on the server. I've also enabled the PMI on the server before I run the program. I've verified it working using Tivoli Performance Manager. Btw, I am using WAS5.1 on XP.

When I run the script, I am getting the error below. It seems to me that the PMI admin client cannot connect to the admin server via SOAP. I tried RMI approach too but to no avail.

Is there anything that I am missing out ? Do I have to enable anything to get the SOAP or RMI connection working ?

Has anybody one similar thing ? Any help is greatly appreciated. Many thanks.

Regards,
Win

=======================================
USING SOAP:

C:\>"C:\WAS51\WebSphere\AppServer\bin\jmxJDBCstat.bat" -host cmstc1s -port 9080
-connector SOAP -refreshRate 1

Connect to cmstc1s:9080:SOAP
com.ibm.websphere.management.exception.AdminException
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:305)
at JmxJDBCStat.main(JmxJDBCStat.java:60)
Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0016E:
Could not create SOAP Connector to connect to host cmstc1s at port 9080
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:354)
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:299)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:285)
... 2 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException

at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SO
APConnectorClient.java:250)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPC
onnectorClient.java:183)
... 7 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response
content type &quot;text/html; charset=utf-8&quot;, must be: &quot;text/xml&quot
;. Response was:
Error 404: No target servlet configured for uri: /
]
at org.apache.soap.rpc.Call.getEnvelopeString(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$2.run(SOAPCo
nnectorClient.java:233)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessControll
er.java:111)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SO
APConnectorClient.java:230)
... 8 more
---- Begin backtrace for nested exception
com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: Could not
create SOAP Connector to connect to host cmstc1s at port 9080
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:354)
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:299)
at JmxJDBCStat.main(JmxJDBCStat.java:60)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:285)
... 2 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException

at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SO
APConnectorClient.java:250)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPC
onnectorClient.java:183)
... 7 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response
content type &quot;text/html; charset=utf-8&quot;, must be: &quot;text/xml&quot
;. Response was:
Error 404: No target servlet configured for uri: /
]
at org.apache.soap.rpc.Call.getEnvelopeString(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$2.run(SOAPCo
nnectorClient.java:233)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessControll
er.java:111)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SO
APConnectorClient.java:230)
... 8 more
---- Begin backtrace for nested exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:285)
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:299)
at JmxJDBCStat.main(JmxJDBCStat.java:60)
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException

at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SO
APConnectorClient.java:250)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPC
onnectorClient.java:183)
... 7 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response
content type &quot;text/html; charset=utf-8&quot;, must be: &quot;text/xml&quot
;. Response was:
Error 404: No target servlet configured for uri: /
]
at org.apache.soap.rpc.Call.getEnvelopeString(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$2.run(SOAPCo
nnectorClient.java:233)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessControll
er.java:111)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SO
APConnectorClient.java:230)
... 8 more
getAdminClient: exception

==================================================================
USING RMI:

C:\>"C:\WAS51\WebSphere\AppServer\bin\jmxJDBCstat.bat" -host cmstc1s -port 9080
-connector RMI -refreshRate 1

Connect to cmstc1s:9080:RMI
com.ibm.websphere.management.exception.AdminException
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:305)
at JmxJDBCStat.main(JmxJDBCStat.java:60)
Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0017E:
Could not create RMI Connector to connect to host cmstc1s at port 9080
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:461)
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:299)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:395)
... 2 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException

at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC
onnectorClient.java:225)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConn
ectorClient.java:109)
... 7 more
Caused by: javax.naming.CommunicationException: A communication failure occurred
while attempting to obtain an initial context with the provider URL: "corbaloc:
iiop:cmstc1s:9080/WsnAdminNameService". Make sure that any bootstrap address in
formation in the URL is correct and that the target name server is running. A b
ootstrap address with no port specification defaults to port 2809. Possible cau
ses other than an incorrect bootstrap address or unavailable name server include
the network environment and workstation network configuration. [Root exception
is org.omg.CORBA.COMM_FAILURE: purge_calls:1218 reason=1 state=5 vmcid: IBM mi
nor code: 306 completed: Maybe]
at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(W
snInitCtxFactory.java:1857)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtx
Factory.java:1020)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(Wsn
InitCtxFactory.java:688)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCt
xFactory.java:583)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(Ws
nInitCtxFactory.java:481)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:40
8)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC
onnectorClient.java:216)
... 8 more
---- Begin backtrace for nested exception
com.ibm.websphere.management.exception.ConnectorException: ADMC0017E: Could not
create RMI Connector to connect to host cmstc1s at port 9080
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:461)
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:299)
at JmxJDBCStat.main(JmxJDBCStat.java:60)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:395)
... 2 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException

at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC
onnectorClient.java:225)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConn
ectorClient.java:109)
... 7 more
Caused by: javax.naming.CommunicationException: A communication failure occurred
while attempting to obtain an initial context with the provider URL: "corbaloc:
iiop:cmstc1s:9080/WsnAdminNameService". Make sure that any bootstrap address in
formation in the URL is correct and that the target name server is running. A b
ootstrap address with no port specification defaults to port 2809. Possible cau
ses other than an incorrect bootstrap address or unavailable name server include
the network environment and workstation network configuration. [Root exception
is org.omg.CORBA.COMM_FAILURE: purge_calls:1218 reason=1 state=5 vmcid: IBM mi
nor code: 306 completed: Maybe]
at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(W
snInitCtxFactory.java:1857)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtx
Factory.java:1020)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(Wsn
InitCtxFactory.java:688)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCt
xFactory.java:583)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(Ws
nInitCtxFactory.java:481)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:40
8)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC
onnectorClient.java:216)
... 8 more
---- Begin backtrace for nested exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
inClientFactory.java:395)
at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:299)
at JmxJDBCStat.main(JmxJDBCStat.java:60)
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException

at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC
onnectorClient.java:225)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConn
ectorClient.java:109)
... 7 more
Caused by: javax.naming.CommunicationException: A communication failure occurred
while attempting to obtain an initial context with the provider URL: "corbaloc:
iiop:cmstc1s:9080/WsnAdminNameService". Make sure that any bootstrap address in
formation in the URL is correct and that the target name server is running. A b
ootstrap address with no port specification defaults to port 2809. Possible cau
ses other than an incorrect bootstrap address or unavailable name server include
the network environment and workstation network configuration. [Root exception
is org.omg.CORBA.COMM_FAILURE: purge_calls:1218 reason=1 state=5 vmcid: IBM mi
nor code: 306 completed: Maybe]
at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(W
snInitCtxFactory.java:1857)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtx
Factory.java:1020)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(Wsn
InitCtxFactory.java:688)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCt
xFactory.java:583)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(Ws
nInitCtxFactory.java:481)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:40
8)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC
onnectorClient.java:216)
... 8 more
getAdminClient: exception

================================================

Ken Hygh

unread,
Jul 4, 2005, 3:04:43 PM7/4/05
to
Win,
Try SOAP on port 8880 instead of 9080 - you're trying to connect to the
HTTP listener instead of the SOAP listener. You can also check in your
server's SystemOut.log file to make sure that it's actually using port
8880, but this is the default for a standalone server.

Ken

swa...@hotmail.com wrote:

>Hi All,
>
>I am a newbie to WAS and I am trying to write a PMI program sample given by this article "IBM WebSphere Developer Technical Journal: Writing PMI applications using the JMX interface".
>
>http://www-128.ibm.com/developerworks/websphere/techjournal/0402_qiao/0402_qiao.html
>
>What I would like to do is to use the PMI/JMX interface to extract JDBC connection pool settings on the server. I've also enabled the PMI on the server before I run the program. I've verified it working using Tivoli Performance Manager. Btw, I am using WAS5.1 on XP.
>
>When I run the script, I am getting the error below. It seems to me that the PMI admin client cannot connect to the admin server via SOAP. I tried RMI approach too but to no avail.
>
>Is there anything that I am missing out ? Do I have to enable anything to get the SOAP or RMI connection working ?
>
>Has anybody one similar thing ? Any help is greatly appreciated. Many thanks.
>
>Regards,
>Win
>
>=======================================
>USING SOAP:
>
>C:\>"C:\WAS51\WebSphere\AppServer\bin\jmxJDBCstat.bat" -host cmstc1s -port 9080
> -connector SOAP -refreshRate 1
>
>Connect to cmstc1s:9080:SOAP
>com.ibm.websphere.management.exception.AdminException
> at JmxJDBCStat.getAdminClient(JmxJDBCStat.java:305)
> at JmxJDBCStat.main(JmxJDBCStat.java:60)
>Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0016E:
> Could not create SOAP Connector to connect to host cmstc1s at port 9080
> at com.ibm.websphere.management.AdminClientFactory.createAdminClient(Adm
>
>
>

[snip]

>================================================
>
>

swa...@hotmail.com

unread,
Jul 4, 2005, 9:51:47 PM7/4/05
to
Hi Ken,

Right on! I was connecting to the wrong port. It works now. Thank you so much !

Regards,
Win

0 new messages