• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Monitor webspehere 5.1 for solaris userd jmx

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi :
i want to used jmx Monitor the websphere5.1 for solaris ,but it have a excepation :

code :
public static void main(String []args){
PmiJmxTest jmx = new PmiJmxTest();

System.out.println("start ......");
jmx.connectJmx("192.168.0.2", "2809", "admin", "admin");
}

public void connectJmx(String hostname,String port,String user,String pwd){
System.out.println("start to connect......");

Properties props = new Properties();
props.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_RMI);
props.setProperty(AdminClient.CONNECTOR_HOST, hostname);
props.setProperty(AdminClient.CONNECTOR_PORT, port);
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "false");
props.setProperty(AdminClient.USERNAME, user);
props.setProperty(AdminClient.PASSWORD, pwd);
System.out.println("start to connect end......");
try {
System.out.println("end to connect end......"+props.getProperty(AdminClient.CONNECTOR_TYPE));
System.out.println("end to connect end......"+props.getProperty(AdminClient.CONNECTOR_HOST));
System.out.println("end to connect end......"+props.getProperty(AdminClient.CONNECTOR_PORT));
System.out.println("end to connect end......"+props.getProperty(AdminClient.USERNAME));
System.out.println("end to connect end......"+props.getProperty(AdminClient.PASSWORD));
client = AdminClientFactory.createAdminClient(props);

System.err.println(client.getDomainName());
} catch (ConnectorException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}



exception :

Unable to read required resource: implfactory.properties
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:74)
at java.io.InputStreamReader.<init>(InputStreamReader.java:118)
at java.util.Properties.load(Properties.java:298)
at com.ibm.ws.util.ImplFactory$1.run(ImplFactory.java:38)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at com.ibm.ws.util.ImplFactory.<clinit>(ImplFactory.java:33)
at com.ibm.ws.Transaction.TransactionManagerFactory$1.run(TransactionManagerFactory.java:141)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at com.ibm.ws.Transaction.TransactionManagerFactory.loadImplementations(TransactionManagerFactory.java:129)
at com.ibm.ws.Transaction.TransactionManagerFactory.getTransactionManager(TransactionManagerFactory.java:77)
at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4045)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3478)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIConnectorClient.java:216)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConnectorClient.java:109)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:395)
at com.ultrapower.agentless.southif.jmx.PmiJmxTest.connectJmx(PmiJmxTest.java:39)
at com.ultrapower.agentless.southif.jmx.PmiJmxTest.main(PmiJmxTest.java:19)
com.ibm.websphere.management.exception.ConnectorException: ADMC0017E: 无法创建 RMI 连接器连接端口 2809 上的主机 192.168.0.2
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:461)
at com.ultrapower.agentless.southif.jmx.PmiJmxTest.connectJmx(PmiJmxTest.java:39)
at com.ultrapower.agentless.southif.jmx.PmiJmxTest.main(PmiJmxTest.java:19)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:395)
... 2 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIConnectorClient.java:225)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConnectorClient.java:109)
... 7 more
Caused by: javax.naming.NamingException: Error during resolve [Root exception is org.omg.CORBA.TRANSIENT: java.net.UnknownHostException: sunv880-1:host=sunv880-1,port=37595 vmcid: IBM minor code: E02 completed: No]
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1559)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIConnectorClient.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(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:395)
at com.ultrapower.agentless.southif.jmx.PmiJmxTest.connectJmx(PmiJmxTest.java:39)
at com.ultrapower.agentless.southif.jmx.PmiJmxTest.main(PmiJmxTest.java:19)
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIConnectorClient.java:225)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConnectorClient.java:109)
... 7 more
Caused by: javax.naming.NamingException: Error during resolve [Root exception is org.omg.CORBA.TRANSIENT: java.net.UnknownHostException: sunv880-1:host=sunv880-1,port=37595 vmcid: IBM minor code: E02 completed: No]
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1559)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIConnectorClient.java:216)
... 8 more
 
reply
    Bookmark Topic Watch Topic
  • New Topic