[SNMP4J] FW: suddent error coming out of nowhere
Frank Fock
fock at agentpp.com
Thu Dec 29 10:25:46 CET 2016
Hi Philippe,
It is a simple NullPointerException and you have the stacktrace and the
code.
It should be easy to identify. From the stacktrace, it seems that you
are using
an old version of SNMP4J. It would be always helpful to note that (and
the exact
version number) in your request for help.
Most likely, you are trying to discover the engine ID for a "null" address.
Which cannot work in any case.
Best regards,
Frank
Am 29.12.2016 um 07:41 schrieb FLORENT Philippe:
> Is this mailing list still active ?
> Can someone answer ?
>
> From: FLORENT Philippe
> Sent: mardi 13 décembre 2016 09:45
> To: snmp4j at agentpp.org
> Subject: FW: suddent error coming out of nowhere
>
> 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<mailto: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
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j
--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax: +49 7024 8688231
More information about the SNMP4J
mailing list