How to resolve Exception in Runtime Errors for JMX mBean Creation, I have Configured in WebSphere5.0 with JDK1.4.2
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bala_Dakshin
Posted On:   Saturday, April 14, 2007 05:05 PM

Question:How to resolve Exception in Runtime where PmiClient cannot able to create, Note:Java Compiling Fine. How to resolve Exception in Runtime where AdminClient Cannot able to create, Note :Java Compiling Fine WebSphere Version 5.0.2,these 5 files are in my ClassPath 1)admin.jar 2)wsexception.jar 3)jmxc.jar 4)pmi.jar 5)pmiclient.jar 6)JMX1.2.zip are in my ClassPath I followed 2 approaches 1)First Approach com.ibm.websphere.pmi.client.PmiClient pmiClnt=new PmiClient(NodeName, PortNumber,"WAS50",false,"CONNECTOR_TYPE_SOAP"); PerfDescriptor[] allservers=pmiClnt.listServers(NodeName); ja   More>>

Question:How to resolve Exception in Runtime where PmiClient cannot able to create, Note:Java Compiling Fine.
How to resolve Exception in Runtime where AdminClient Cannot able to create, Note :Java Compiling Fine


WebSphere Version 5.0.2,these 5 files are in my ClassPath
1)admin.jar
2)wsexception.jar
3)jmxc.jar
4)pmi.jar
5)pmiclient.jar
6)JMX1.2.zip are in my ClassPath



I followed 2 approaches
1)First Approach

com.ibm.websphere.pmi.client.PmiClient pmiClnt=new
PmiClient(NodeName,
PortNumber,"WAS50",false,"CONNECTOR_TYPE_SOAP");

PerfDescriptor[]
allservers=pmiClnt.listServers(NodeName);
javax.management.ObjectName[]
onames=pmiClnt.listMBeans(NodeName,ServerName);

Here have added all the Jar files in classpath of
WAS5.0, compiled fine ,

when I ran am getting
exception in Runtime for PmiClient Creation.


-----------------------------------------------

2)Second Approach
Properties props = new Properties();
props.setProperty(AdminClient.CONNECTOR_TYPE,
AdminClient.CONNECTOR_TYPE_SOAP);
props.setProperty(AdminClient.CONNECTOR_HOST,
HostName);
props.setProperty(AdminClient.CONNECTOR_PORT,
PortNumber);

props.setProperty(AdminClient.USERNAME, usrname); >>>>
We don't have username for SRSDev Appserver

props.setProperty(AdminClient.PASSWORD, usrpwd);
>>>>>>We don't have password for SRSDev
Appserver(WAS5.0)

AdminClient adminClient =
AdminClientFactory.createAdminClient(props);----

I am
getting exception in Runtime for adminClient Creation



// create a config service proxy object.
ConfigService configService = new
ConfigServiceProxy(adminClient);

// create a session.
Session session = new Session();
whereAmI=54;
// query to get the node where we want to create the
new server.
ObjectName node = configService.resolve(session,
"Node=" + NodeName)[0];
whereAmI=55;
// Locate the application object.
ObjectName rootID = configService.resolve(session,
"Deployment="+ApplicationName)[0];
//System.out.println ("rootID is: " + rootID);
ObjectName
listenerMBean=ConfigServiceHelper.createObjectName
(nwie.net:type=Custom,name=ListenerManagement,
id=uniqueid);
where nwie.net ----is domain name) if I follow this
syntax am getting compilation error)
----------------------------------



My Requirement is need to Restart the MQ Listener is configured in Websphere5.0 Programmatically


regards
Bala    <<Less
About | Sitemap | Contact