[SNMP4J] NullPointerException - SnmpTargetMIB.getTarget()

Frank Fock fock at agentpp.com
Sat Jul 22 09:40:35 CEST 2006


Hi Glenn,

Sorry for the late response I did not get the point
at the first report of the bug.

To fix it use the following code:

     public Target getTarget(OctetString contextEngineID,
                             OctetString contextName) {

....
         t = new UserTarget(addr, (OctetString) 	
	      paramsRow.getValue(idxSnmpTargetParamsSecurityName),
// <=== The following line contains the fix: ====>
                            contextEngineID.getValue(),
...
   }


Best regards,
Frank

Glenn Gerhardt (glgerhar) wrote:
> I've encountered this null dereference as well.  
> Is a fix available for this problem?
> -Glenn
> 
> 
>> Frank,
>>
>> In SnmpTargetMIB.getTarget() method, UserTarget object is 
>> created with null authoritativeEngineID that causes the 
>> NullPointerException.
>>
>> -Senthil
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>>

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




More information about the SNMP4J mailing list