I am having terrible trouble with NotificationOriginatorImpl.sendNotification().
When I have V1 and V2 on and V3 off I get an NPE at
java.lang.NullPointerException
at org.snmp4j.smi.OctetString.<init>(OctetString.java:56)
at 
org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl.sendNotification(NotificationOriginatorImpl.java:248)
at 
org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl.notify(NotificationOriginatorImpl.java:339)
at 
org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl.notify(NotificationOriginatorImpl.java:133)
at 
org.snmp4j.agent.AgentConfigManager.fireLaunchNotifications(AgentConfigManager.java:340)
at org.snmp4j.agent.AgentConfigManager.launch(AgentConfigManager.java:332)
at org.snmp4j.agent.AgentConfigManager.run(AgentConfigManager.java:242)

If I have V3 set on, no issues are seen.

I am using versions snmp4j_1.11.jar and snmp4j-agent-1.4.jar in my classpath.  
JVM is 1.6.

It looks like the NPE is in SnmpTargetMIB.getLocalEngineID(). If MPV3 is null 
(which it is because the user asked for 1 and 2 only) the code returns a null, 
so there is not localEngineID.

If I call engineID = new OctetString(MPv3.createLocalEngineID()) I do get a 
value, if that matters.

Is this a known issue and is there any way around this?


_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to