Hi,
I found and read previous topic about PMD issues but mine is a little bit different.
For me PMD is working (even with Java9) from command line and ant tool but the problem is with writing cache file (Odmowa dost?pu) == (Access Denied). Maybe this is issue with PMD itseld but I tried to update lib and bin with newest pmd version but still same problem.
Error 1 gru 13, 2017 10:15:56 AM net.sourceforge.pmd.cache.FileAnalysisCache loadFromFile
SEVERE: Could not load analysis cache to file. C:\ProgramData\TheWelkinSuite (Odmowa dost?pu)
gru 13, 2017 10:15:57 AM net.sourceforge.pmd.cache.AbstractAnalysisCache checkValidity
INFO: Analysis cache invalidated, rulesets changed.
gru 13, 2017 10:15:57 AM apex.jorje.parser.impl.BaseApexLexer dedupe
INFO: Deduped array ApexLexer.DFA22_transition. Found 7403062 shorts which is 14MB not including array overhead. Removed 6746470 shorts which is 12MB not counting array overhead.Took 6ms.
Exception in thread "main" java.lang.IllegalAccessError: tried to access method apex.jorje.semantic.exception.Errors.<init>()V from class net.sourceforge.pmd.lang.apex.ast.ApexTreeBuilder
at net.sourceforge.pmd.lang.apex.ast.ApexTreeBuilder.<init>(ApexTreeBuilder.java:208)
at net.sourceforge.pmd.lang.apex.ast.ApexParser.parse(ApexParser.java:52)
at net.sourceforge.pmd.lang.apex.ApexParser.parse(ApexParser.java:37)
at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:113)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:163)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:97)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:52)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:88)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:27)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Please check the global PMD settings 1 1