[SNMP4J] NoSuchMethodError in TestAgent

Frank Fock fock at agentpp.com
Wed Feb 5 08:15:25 CET 2014


Hi Etienne,

Am 05.02.2014 04:17, schrieb Dysli Metref Etienne:
> On 05/02/2014 01:03, Frank Fock wrote:
>> It seems that you have several versions of SNMP4J in your classpath.
> I trust Maven to not mess up my classpath. ;)
Here is the problem. Maven (at least it is not Maven - that is true) 
does mess
up your classpath, because SNMP4J-Agent 2.1.0 was built against SNMP4J 2.2.3
and thus, you get v2.2.3 in your classpath if you add a dependency to
SNMP4J-Agent 2.1.0 to your dependencies in your application's pom.xml.

If you then also add SNMP4J 2.2.4, you have two different versions at the
same time.

Best regards,
Frank

> I was able to pinpoint the error: it only happens when using SNMP4J-Agent
> 2.1.0 in combination with SNMP4J 2.2.4. I tried with 2.2.3 and it does not
> give me any error. I have created a small Maven project to demonstrate this at
> https://github.com/edysli/SNMP4J_NoSuchMethodError_demo. I hope it will help
> you fix SNMP4J-Agent.
>
> Cheers,
>     Etienne
>
>

-- 
---
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