[SNMP4J] FW: suddent error coming out of nowhere

FLORENT Philippe Philippe.FLORENT at edenred.com
Tue Dec 13 09:44:36 CET 2016


Now I get the same on my pc, no update was made on my pc nor on the remote system
Can someone guide me through this ?
thanks

From: FLORENT Philippe
Sent: lundi 12 décembre 2016 12:02
To: snmp4j at agentpp.org
Subject: suddent error coming out of nowhere

Hi,

Suddently my collegue have issues with the app I ve written (works perfectly fine on my pc)
I rebooted his pc, but still the same

java.lang.NullPointerException
                at java.util.Hashtable.remove(Unknown Source)
                at org.snmp4j.mp.MPv3.removeEngineID(MPv3.java:356)
                at org.snmp4j.Snmp.discoverAuthoritativeEngineID(Snmp.java:1177)
                at starrwarr.remote.snmp.SnmpProber.Connect(SnmpProber.java:93)
                at starrwarr.Machine.run(Machine.java:97)
                at java.lang.Thread.run(Unknown Source)

this was not occurring before and I cant figure out what's going wrong

here is the code I use :

                    TransportMapping transport = new DefaultUdpTransportMapping();
                    snmp = new Snmp(transport);
                    USM usm = new USM(SecurityProtocols.getInstance(),new OctetString(MPv3.createLocalEngineID()), 0);
                    SecurityModels.getInstance().addSecurityModel(usm);
                    transport.listen();
                    snmp.listen();

            Address targetAddress = GenericAddress.parse("udp:"+ipAddress+"/"+port);
            target = new UserTarget();
            target.setAddress(targetAddress);
            target.setRetries(1);
            target.setTimeout(5000);
            target.setVersion(SnmpConstants.version3);
            target.setSecurityLevel(SecurityLevel.AUTH_PRIV);
            target.setSecurityName(new OctetString(userName));

thanks



More information about the SNMP4J mailing list