0

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? enter image description here

1
  • WAR and JAR (Maven's default type) are two different packaging formats. how are you running this? Commented May 5, 2018 at 11:33

2 Answers 2

2

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>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. it will build but when the maven module runs, it will throw Cast Exception which maybe caused by another problem
0

Thanks everyone. I finally partly found my own problem. pom.xml of my maven module

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.