[SNMP4J] DuplicationRegistrationException
karuna s
sirivars2004.sw at gmail.com
Thu Jul 21 14:10:46 CEST 2011
Hello,
I am beginner to snmp4j. I have a task to write my own mib file.
So when i want to register oid's to agent, it is throwing an exception
DuplicationRegistrationException.
---------------------------------------------------------
testOID = "1.3.6.1.9348.13.1.2...";
registerManagedObject(new MOScalar(testOID,MOAccessImpl.ACCESS_READ_ONLY,new
OctetString("Sample OID")));
testOID1 = "1.3.6.1.9348.13.1.3...";
registerManagedObject(new
MOScalar(testOID1,MOAccessImpl.ACCESS_READ_ONLY,new OctetString("Sample
OID")));
public void registerManagedObject(ManagedObject mo) {
try {
//server.register(mo,new OctetString("look2"));
server.register(mo, null);
} catch (DuplicateRegistrationException ex) {
throw new RuntimeException(ex);
}
}
How to avoid this problem?
Thanks in advance :).
Regards
nani
More information about the SNMP4J
mailing list