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(SNMPManager.java:43)
at SNMPManager.main(SNMPManager.java:29)
29
String sysDescr = client.getAsString(new OID(".1.3.6.1.2.1.25.2.3.1.5.1")); //Nic Name
43
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.