呓语 | 杨英明的个人博客

专注于c++、Python,欢迎交流

By

java.lang.ClassNotFoundException 系列问题解决方案

解决方案

报错:java.lang.NoClassDefFoundError:org/apache/commons/lang/exception/NestableRuntimeException

解决方案:

添加 pom.xml :

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6</version>
</dependency>

报错:java.lang.ClassNotFoundException: net.sf.ezmorph.Morpher

解决方案:

添加 pom.xml :

<dependency>
    <groupId>net.sf.ezmorph</groupId>
    <artifactId>ezmorph</artifactId>
    <version>1.0.6</version>
</dependency>

报错:java.lang.ClassNotFoundException: org.apache.commons.collections.map. ListOrderedMap

解决方案:

添加 pom.xml :

<dependency>
    <groupId>commons-collections</groupId>
    <artifactId>commons-collections</artifactId>
    <version>3.2.2</version>
</dependency>

报错:java.lang.ClassNotFoundException: org.apache.commons.beanutils.DynaBean

解决方案:

添加 pom.xml :

<dependency>
    <groupId>commons-beanutils</groupId>
    <artifactId>commons-beanutils</artifactId>
    <version>1.8.3</version>
</dependency>

或者直接添加以下 依赖:

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6</version>
</dependency>
<dependency>
    <groupId>net.sf.ezmorph</groupId>
    <artifactId>ezmorph</artifactId>
    <version>1.0.6</version>
</dependency>
<dependency>
    <groupId>commons-collections</groupId>
    <artifactId>commons-collections</artifactId>
    <version>3.2.2</version>
</dependency>
<dependency>
    <groupId>commons-beanutils</groupId>
    <artifactId>commons-beanutils</artifactId>
    <version>1.8.3</version>
</dependency>

参考资料

  • NoClassDefFoundError: org/apache/commons/lang/exception/NestableException #128
    https://github.com/googleads/googleads-java-lib/issues/128
  • java.lang.ClassNotFoundException: org.apache.commons.collections.map.ListOrderedMap解决方法
    https://blog.csdn.net/xw13106209/article/details/6104516
  • java.lang.ClassNotFoundException: org.apache.commons.beanutils.DynaBean
    https://blog.csdn.net/sinat_27747695/article/details/75303824

原创声明

转载请注明:呓语 » java.lang.ClassNotFoundException 系列问题解决方案