Reputation: 17
`Getting NoClassDefFoundError Caused by: java.lang.ClassNotFoundException while trying to execute maven project. Created TestNG file and added classes.
Do we need to add configurations? The same code was getting executed earlier. I was trying to add extent reports code and then reverted. Not sure how to clean the project.Do we need to clear the dependecies and refresh?
Added extent reports dependencies and relevant code but reverted them`
Upvotes: 0
Views: 21
Reputation: 59
This error arises generally when there are changes in configuration or dependencies. You can resolve it by trying few of the options
mvn clean
and then mvn install
commandUpvotes: 0