is not working properly

Exception in thread “main” java.lang.NullPointerException: Cannot invoke “org.snmp4j.PDU.get(int)” because the return value of “org.snmp4j.event.ResponseEvent.getResponse()” is null
at SNMPManager.getAsString(
at SNMPManager.main(

String sysDescr = client.getAsString(new OID(".")); //Nic Name

return event.getResponse().get(0).getVariable().toString();

Windows and linux machines can communicate themselves, and the linux and ip address of the client computer are also set. However, it gives an error.

How Can I resolve this problem.

How Can I resolve this problem

Maybe ask the author of

That class is not part of any SNMP4J API.
Source of the underlying problem might be:

  1. wrong port or address
  2. wrong credentials
  3. too small timeout setting
1 Like

Can you help me on this issue. I need to get OID value on linux machine using SNMPJ4 api with java.

for example - sysObjectID

I need to get this value on linux machine with java using SNMPJ4 api