[SNMP4J] NPE in CommandProcessor.java:442

Mark Gorokhov mark.gorokhov at comtechmobile.com
Mon Oct 27 17:43:51 CET 2008


What might cause NPE in CommandProcessor.java:442?

My environment:
   snmp4j-1.9.3c
   snmp4j-agent-1.2.1d

Steps to reproduce:
1. MIB Explorer Pro 2.2.3 is started.
2. Start application with agent with SNMPv3 user credentials.

Reported NPE in CommandProcessor.java:442

I added logger at line CommandProcessor.java:441.
    logger.error("CommandProcessor:"
        + " requestEvent=" + requestEvent
        + " requestEvent.getStateReference()=" 
        + requestEvent.getStateReference());

Here is what was logged (I added lines wrap):
  CommandProcessor: 
  requestEvent=CommandResponderEvent[
  transportMapping=org.snmp4j.transport.DefaultUdpTransportMapping
     @ae533apeerAddress=127.0.0.1/165,
  processed=false,
  pdu=[REPORT[reqestID=0, errorStatus=0, errorIndex=0,
       VBS[1.3.6.1.6.3.15.1.1.4.0 = 0]]],
  securityName=,
  securityModel=3,
  securityLevel=1]
  requestEvent.getStateReference()=null <------- PROBLEM

The address 127.0.0.1/165 is MIB Explorer address to receive
notifications.
OID 1.3.6.1.6.3.15.1.1.4.0 is rfc3414 usmStatsUnknownEngineIDs.

The agent works fine with v2/public credentials, the same code was 
working year ago with v3 credentials. I noticed the problem after 
I upgraded SNMP4J. 

What might cause the NPE?

Thanks,
Mark G




More information about the SNMP4J mailing list