File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Ruleset not found error while customizing PMD. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Ruleset not found error while customizing PMD." Watch "Ruleset not found error while customizing PMD." New topic

Ruleset not found error while customizing PMD.

Piyush Tripathi

Joined: Jan 28, 2009
Posts: 16
I'm adding a new rule to Java code analysis tool PMD using it in standalone version.I write the rule class and compile that with the jar file pmd14-4.2.4.jar. Then i add the rule's .class file to the pmd14-4.2.4.jar file.After that i write the rule's xml file and add that too to the pmd14-4.2.4.jar file.Then i add the ruleset reference to the all-java.xml file present in the pmd14-4.2.4.jar.
Then i run the tool on the commandline as follows-

C:\PMD\java14\bin>pmd.bat f:\my\ xml rulesets/nestedloopscheck.xml

It gives 'Ruleset not found' error. Some part of the error is listed below.

C:\PMD\java14\bin>pmd.bat f:\my\ xml rulesets/nestedloopscheck.xml
Ruleset not found
net.sourceforge.pmd.RuleSetNotFoundException: Can't find resource rulesets/neste
dloopscheck.xml. Make sure the resource is a valid file or URL or is on the CLA
SSPATH. Here's the current classpath: C:\PMD\java14\bin\/../../java14/lib/pmd14
at net.sourceforge.pmd.RuleSetFactory.tryToGetStreamTo(RuleSetFactory.ja
at net.sourceforge.pmd.RuleSetFactory.createSingleRuleSet(RuleSetFactory
at net.sourceforge.pmd.RuleSetFactory.createRuleSets(
at net.sourceforge.pmd.RuleSetFactory.createRuleSets(
at net.sourceforge.pmd.PMD.doPMD(
at net.sourceforge.pmd.PMD.main(

Feb 11, 2009 2:56:29 PM net.sourceforge.pmd.PMD doPMD
SEVERE: Ruleset not found

What am I doing wrong.Can anyone suggest me?

Thanks in advance,
I agree. Here's the link:
subject: Ruleset not found error while customizing PMD.
It's not a secret anymore!