The Welkin Suite Forum

PMD Scan failed



PMD Scan failed

pmd
  • Please log in to reply

#1
windows version welkinsuite

tadeuszhyzy

    Posted 13 Dec 2017 and edited 15 Dec 2017

    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	
    

    Tadeusz Hyży <tadeuszhyzy@gmail.com>

    Salesforce Solution Architect

    tadeuszhyzy.pl


    5 replies to this topic

    #2

    kate.dulko

      Posted 13 Dec 2017

      Hi Tadeusz,


      Thank you for sharing this issue with us.


      Can you please let me know when the issue started to reproduce and if you could use the built-in PMD support in the IDE previously?

      Also, since this is a known issue that PMD doesn't work with Java 9 by default, may I please clarify with you if you didn't make any changes in PMD settings to set up this connection?


      We would greatly appreciate this and any other additional information (especially about the setup and configuration of the PMD in your case) and would be happy to solve the issue as soon as possible.


      Thank you,

      Kate


      Kate Dulko
      Customer Relations

      The Welkin Suite

      twitter: @KateDulko
      skype id: d_katerina
      e-mail: kate.dulko@welkinsuite.com

       

        


      #3

      tadeuszhyzy

        Posted 14 Dec 2017

        Hi Kate!

        To be honest I discovered PMD tool one week ago and use it like a stand alone application (with ant setup). I didn't change anything in the setup - just copied binaries and libraries to ant folder, made changes inside build.xml and it worked.

        Only than I thought that maybe WelkinSuite has some fancy tool to do code scan and I found out that PMD should be here OOTB.

        Maybe this is issue with Java 9 and I can wait for official PMD 6.x to be released. I know that it might be 'my' problem with configuration but I didn't change anything inside WelkinSuite or PMD so I thought that it should work.

        Thanks Kate for answer!

        Tadek


        Tadeusz Hyży <tadeuszhyzy@gmail.com>

        Salesforce Solution Architect

        tadeuszhyzy.pl


        #4

        vlgubanovich

          Posted 14 Dec 2017 and edited 14 Dec 2017

          Hi Tadeusz,

           

          That's interesting situation that it's not working for you out of the box in the IDE. Can I please ask you to try doing the same as I've suggested in the another PMD topic - this post has directions. That actions will point the PMD instance that's bundled with the IDE to the Java8.

          Not sure if this would help, as in your case we see the accedd denied issue somewhere inside the PMD itself, but it's worth trying. In the meantime we'll try to understand the reason of such behavior and what other options to try/resolve the issue we can suggest you.

           

          Thank you,

          Vladimir


          Vladimir Gubanovich
          Head of Product
           
          The Welkin Suite
          skype id: vladimir.gubanovich
          e-mail: vladimir.gubanovich@welkinsuite.com


          #5

          tadeuszhyzy

            Posted 14 Dec 2017

            Hey Vladimir!

            I feel really emberased. This solution in previous topic did the trick and it's working now in IDE. Sorry for cloning it but I thought that it was different reasons. It seems that problem indeed was in Java9...

            Thanks for help!

            Tadek


            Tadeusz Hyży <tadeuszhyzy@gmail.com>

            Salesforce Solution Architect

            tadeuszhyzy.pl


            #6

            vlgubanovich

              Posted 15 Dec 2017

              Hi Tadeusz,


              You're always welcome and we're happy that you can now enjoy PMD in The Welkin Suite :)

              Yup, strangely, but the PMD's incompatibility with the Java 9 produced such a strange errors.


              Best Regards,

              Vladimir


              Vladimir Gubanovich
              Head of Product
               
              The Welkin Suite
              skype id: vladimir.gubanovich
              e-mail: vladimir.gubanovich@welkinsuite.com





              Boost Your Productivity. Get Started Today

              Try Free Trial