[SNMP4J] NoSuchMethodError in TestAgent

Frank Fock fock at agentpp.com
Tue Feb 4 18:03:59 CET 2014


Hi Etienne,

It seems that you have several versions of SNMP4J in your classpath.

Best regards,
Frank

Am 04.02.2014 10:05, schrieb Dysli Metref Etienne:
> Hi list,
>
> I am trying SNMP4J by simply running the org.snmp4j.agent.test.TestAgent class in a JUnit test, but I get the following exception:
>
> java.lang.NoSuchMethodError: org.snmp4j.security.SecurityProtocols.addDefaultProtocols()V
>   at org.snmp4j.agent.BaseAgent.initMessageDispatcher(BaseAgent.java:384)
>   at org.snmp4j.agent.BaseAgent.init(BaseAgent.java:145)
>   at org.snmp4j.agent.test.TestAgent.main(TestAgent.java:458)
>   at snmp.SimpleAgentTest.tryTestAgent(SimpleAgentTest.java:35)
>
> Here is the test method:
> @Test
> public void tryTestAgent() throws IOException {
>    String[] args = {"127.0.0.1/1610"};
>    TestAgent.main(args);
> }
>
> I am running this on OpenJDK 7 with Maven 3.0.4, snmp4j 2.2.4, snmp4j-agent 2.1.0. Am I running TestAgent the wrong way or is something wrong with my environment?
>
> Sincerely,
>     Etienne
>
> This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://s16675406.onlinehome-server.info/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