Hi Mark,

The NPE is probably caused by an unauthenticated request.
I have changed the SNMP4J code accordingly, to avoid
that exception in future releases.

Best regards,
Frank

Mark Gorokhov wrote:
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

_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com

_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to