java.lang.NoClassDefFoundError: org/apache/commons/collections/Transformer

前端 未结 4 2015
面向向阳花
面向向阳花 2020-12-11 17:00

I am receiving the following error java.lang.NoClassDefFoundError: org/apache/commons/collections/Transformer trying to use BeanMap from the Apache

相关标签:
4条回答
  • 2020-12-11 17:23

    Just add this dependency to your project.

        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.2</version>
        </dependency>
    
    0 讨论(0)
  • 2020-12-11 17:32

    commons-collections4-x.x.jar Add the library to your classpath and try to run again. It will work.

    Download the library from: https://mvnrepository.com/artifact/org.apache.commons/commons-collections4/4.1

    0 讨论(0)
  • 2020-12-11 17:40

    Adding dependency of version 3.2.1 seems working here

    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.1</version>
    </dependency>
    
    0 讨论(0)
  • 2020-12-11 17:41

    I am not really sure, but i think your error is because of jar versions. Lately apache has changed the package of the new versions of their jars because they implement new functionality or something that is not fully backward compatible. For example the jar commons-beanutils-1.9.2.jar depends on commons-collections-3.2.1.jar (according to this site) and you are using commons-collections-4.4.0.jar. If you are planning using the universe of apache jars, you need to be sure that they are all compatible.

    0 讨论(0)
提交回复
热议问题