Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10566

WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.5.12
    • None
    • groovy-jdk
    • None
    •  Mac OS X 12.2.1 x86_64

    Description

      Hi, 
      Thanks for your time.    I'm trying to integrate sonarqube on a complex, old gradle project structure.   We have 450 subprojects, and it gets more complicated, I'll save that for now, it may not be important, the basic structure is.

      project
      -master
      -subprojecttype
      --subprojectinstance1
      ...
      --subprojectinstance450

       

      ./gradlew tasks --debug  | grep -A5  sonarqub

       

      2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: An illegal reflective access operation has occurred
      2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/cal.taylor@ibm.com/.gradle/wrapper/dists/gradle-6.8.1-bin/a3ijn718agivfn4m4c5tfgx2i/gradle-6.8.1/lib/groovy-all-1.3-2.5.12.jar) to method java.util.AbstractCollection.finishToArray(java.lang.Object[],java.util.Iterator)
      2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
      2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      2022-03-03T09:46:20.488-0400 [ERROR] [system.err] WARNING: All illegal access operations will be denied in a future release
      

       

      I think this error is causing sonarqube to die silently, the task never gets added to our build.   

      Any assistance, comments or suggestions are welcome.

      $ ./gradlew --version
      ------------------------------------------------------------
      Gradle 6.8.1
      ------------------------------------------------------------
      Build time:   2021-01-22 13:20:08 UTC
      Revision:     31f14a87d93945024ab7a78de84102a3400fa5b2
      Kotlin:       1.4.20
      Groovy:       2.5.12
      Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
      JVM:          1.8.0_322 (Eclipse OpenJ9 openj9-0.30.0)
      OS:           Mac OS X 12.2.1 x86_64
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              caltaylor Calvin Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: