[SNMP4J] SNMP send() exception

Frank Fock fock at agentpp.com
Fri Oct 16 00:44:05 CEST 2009


Scott,

Please see the change log of SNMP4J 1.10:

* Fixed: NullPointerException in PendingRequest.pduHandleAssigned
   when retry > 0.

So upgrading should fix the problem.

Best regards,
Frank

Mackay, Scott wrote:
> 
> I am using the library, 1.93 I believe, and getting an odd error.
> 
> in a SNMP send( send(PDU pdu, Target target) )
> 
> it all works fine, but at some point start getting Exceptions listed: 
> Exception in thread "Timer-24" java.lang.NullPointerException
>     at org.snmp4j.Snmp$PendingRequest.pduHandleAssigned(Unknown Source)
>     at org.snmp4j.MessageDispatcherImpl.sendPdu(Unknown Source)
>     at org.snmp4j.Snmp.sendMessage(Unknown Source)
>     at org.snmp4j.Snmp$PendingRequest.run(Unknown Source)
>     at java.util.TimerThread.mainLoop(Unknown Source)
>     at java.util.TimeThread.run(Unknown Source)
> 
> the send does not throw it, though as we have a try/catch around it that does not get raised.
> We also check for a null response and a null response.getResponse(), along with checking for 
> response.getResponse().getErrorStatus()!=SnmpConstants.SNMP_ERROR_SUCCESS
> but none of those seem to be true.  The target may have reset, so I am not sure about any built up authentication in a bad state, but surprised none of the above were raised.  I have not reduced the code segment to more narrowly reproduce, but was wondering if there were any other status checks which are normally done to validate the send's results.
> 
> 
> -Scott 
> 
> 
> 
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

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




More information about the SNMP4J mailing list