[SNMP4J] Which library should I use?

Frank Fock fock at agentpp.com
Thu Oct 6 08:21:40 CEST 2016


Hi,

The code you used is just out-dated and was probably written for the 1.x
releases of SNMP4J-Agent.

But the issue is simple to fix: Just use the SnmpCommunityEntryRow
instead MOTableRow as type for "row".

Best regards,
Frank

Am 06.10.2016 um 07:22 schrieb BYEONG-GI KIM:
> Hello.
>
> I'm a new who get started to learn snmp agent & manager implementations via
> snmp4j.
>
> I have a question; I've been practicing how the source code is written so
> that I copied and pasted several example codes from some blogs and websites
> like,
>
> http://www.jitendrazaa.com/blog/java/snmp/creating-snmp-agent-server-in-java-using-snmp4j/
>
> The problem is the source code has an error from the line
> "communityMIB.getSnmpCommunityEntry().addRow(row);" with the error message
> "The method addRow(SnmpCommunityMIB.SnmpCommunityEntryRow) in the type
> MOTable<SnmpCommunityMIB.SnmpCommunityEntryRow,MOColumn,MOMutableTableModel<SnmpCommunityMIB.SnmpCommunityEntryRow>>
> is not applicable for the arguments (MOTableRow)"
>
> I so thought that I'm using wrong snmp4j version, which was the newest
> version at the maven repo (
> https://mvnrepository.com/artifact/org.snmp4j/snmp4j/2.5.2) though. I thus
> changed the libraries to the things that attached in the zip files at the
> snmp4j download menu, aka snmp4j-agent-2.5.0.jar and snmp4j-2.5.0.jar. The
> error, however, still exists.
>
> What's the problem with this? is the example code just wrongly implemented?
> Or, are the libraries wrongly set?
>
> Thanks in advance!
>
> Regards
>
> BGKIM
> _______________________________________________
> 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