Solo
Solo

Reputation: 579

Intellij Checkstyle gives error NoClassDefFoundError

I have Intellij 2017.2.3 and Checkstyle-IDEA 5.10.0 running on my Ubuntu 17 dekstop. When i try to add a checkstyle for my Java project (at Settings->Other settings->Checkstyle) I get this error message:

java.lang.NoClassDefFoundError: org/apache/commons/collections/FastHashMap
    at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:963)
    at org.apache.commons.beanutils.BeanUtilsBean.copyProperty(BeanUtilsBean.java:391)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.tryCopyProperty(AutomaticBean.java:217)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.contextualize(AutomaticBean.java:249)
    at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:455)
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:186)
    at org.infernus.idea.checkstyle.service.cmd.OpCreateChecker.execute(OpCreateChecker.java:58)
    at org.infernus.idea.checkstyle.service.cmd.OpCreateChecker.execute(OpCreateChecker.java:26)
    at org.infernus.idea.checkstyle.service.CheckstyleActionsImpl.executeCommand(CheckstyleActionsImpl.java:126)
    at org.infernus.idea.checkstyle.service.CheckstyleActionsImpl.createChecker(CheckstyleActionsImpl.java:56)
    at org.infernus.idea.checkstyle.service.CheckstyleActionsImpl.createChecker(CheckstyleActionsImpl.java:47)
    at org.infernus.idea.checkstyle.checker.CheckerFactoryWorker.run(CheckerFactoryWorker.java:44)

Is it familiar for anyone?

Upvotes: 1

Views: 529

Answers (1)

sengathir
sengathir

Reputation: 28

I got the same issue while migrating the project from WAS 8 to WAS Liberty. I did copying the jar commons-collections.jar in to the server location /servers/<server_name>/lib/global and resolved it. So try to place the jar at IntelliJ local server.

java.lang.NoClassDefFoundError: org.apache.commons.collections.FastHashMap 
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:963)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:935)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:823)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:431)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)

Upvotes: 1

Related Questions