简体   繁体   中英

Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils, maven pom.xml wa

I know someone else has asked this similar question before, but it's not the same. I solved my problem by removing war in the maven pom.xml. what's going on behind the scene? Why does it complain ClassNotFoundException? 在此处输入图片说明

MoJoExecutionException is exceptions by maven plugins to signle something is wrong. reading you error stacktrace looks like your tomcat plugin is complaining about class not found at runtime.

can you please share your complete pom.xml . Have you added tomcat plugin ?

Also add below dependency

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-io</artifactId>
    <version>1.3.2</version>
</dependency>

Thanks everyone. I finally partly found my own problem. 我的Maven模块的pom.xml

I changed dubbo version from 2.8.4 (which I maven packaged from github myself) to 2.5.3, which turned out to work. There is no need to use Common IO jar as dependency any more whether the module is packaged as jar or war here. maybe can be helpful to someone else who happens to run to the same issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM