首页> 开发问题 >其它问题 其它问题
报错:maven:java.lang.NoClassDefFoundError: org/apache/commons/io/Charsets
作者:小萝卜 2019-12-11 【 其它 】 浏览 2587
简介上网查了以后,是因为这个类到2.4版本以后才有,之前的版本是没有的。我本身的依赖是1.4的,所以找不到这个类。我到 C:Usersxym48.m2repositorycommons-iocommons-io 中,把里面的各个版本都打开看了,确实只有2.4以后的版本里面有这个类。
运行报错:
maven:java.lang.NoClassDefFoundError: org/apache/commons/io/Charsets
找不到Charsets这个类
上网查了以后,是因为这个类到2.4版本以后才有,之前的版本是没有的。我本身的依赖是1.4的,所以找不到这个类。
我到 C:Usersxym48.m2repositorycommons-iocommons-io 中,把里面的各个版本都打开看了,确实只有2.4以后的版本里面有这个类。
修改依赖:
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
很赞哦! (0)
相关文章
- 无法定位程序输入点到xxx.dll
- Python问题:SyntaxError: Non-ASCII character '\xe2' in file
- MapReduce报错:Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :interface javax.xml.soap.Text
- bash: hadoop:command not found
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- Android Studio安装&&安装bug
- Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference
- 异常解决:util.NativeCodeLoader: Unable to load native-hadoop library for your platform
- 心路历程——毕设程序mr跑不通的问题
- VMWARE虚拟机安装64位系统此主机支持IntelVTx 但IntelVTx处于禁用状态
