Forum Discussion

APERRY's avatar
APERRY
Occasional Contributor
5 years ago

ReadyAPI 3.1 - TestRunner - An illegal reflective access operation has occurred

Hello everyone,

 

I launch my ReadyAPI Tests with a gitlab runner.

Since I updated my using image on ReadyAPI 3.1, I recieve the following errors : 

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/usr/local/SmartBear/ready-api-license-manager-1.3.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 
I dont recieve theses errors with the ReadyAPI 3.0 image.
 
Any ideas ?
 
Thank you in advances for your responses.
 
Anthony

11 Replies

  • richie's avatar
    richie
    Community Hero

    Hi APERRY 

     

    When you moved from v3.0 to v3.1, did you upgrade your Java RE/DK at all?

     

    I found this on stackoverflow that appears to indicate this warning is related to upgrades above Java 8

     

    nice one,

     

    rich

    • APERRY's avatar
      APERRY
      Occasional Contributor

      Hi richie 

       

      Thank you for your answer. 

      My gitlab runner do not contain any java version, I use the openjdk 12 which is installed on the ReadyAPI 3.1 image

      Maybe iy's openjdk the source of the problem ?

       

      • richie's avatar
        richie
        Community Hero

        Hey APERRY 

         

        perhaps?  from my remedial understanding, I think that some java component type shouldnt be accessing some other component and if it does (considering the Oracle JRE v9 upgrade) you get the warning where you wouldn't on earlier versions.....i think! :)

         

        did you upgrade the openjdk when you upgraded ReadyAPI!?

         

        nice one,

         

        rich

  • nmrao's avatar
    nmrao
    Champion Level 3
    Is it impacting your usage in any way? That is a "warning" only, correct?
    • APERRY's avatar
      APERRY
      Occasional Contributor

      Hi richie 

       

      Yes, I speack about "image" because I use the testrunner dockerhub image. I don't speak about a ghost or somthing else.

      I just use the dockerhub image to launch my test on gitlab. That's why no java version is installed. 

      The last version of this image use openjdk and not java (as I mention'd on my previous message).

       

      Hi nmrao 

      Indeed, it has no impact but I did not have these messages on version 3.0. I imagine it is related to the transition from JAVA to OpenJDK.
      I will indicate this to the Smartbear support.

      • nmrao's avatar
        nmrao
        Champion Level 3
        You may ignore the warning then.
  • rse's avatar
    rse
    New Contributor

    We had a similar issue in our installation. A succesful workaround for us has been to add

    "--add-opens=java.base/java.util.regex=ALL-UNNAMED" to the JAVA_OPTS in the testrunner.

     

    Our warning was:

    "WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedConstructor$1 (file:/C:/Program%20Files/SmartBear/ReadyAPI-3.1.0/lib/groovy-all-2.4.17.jar) to constructor java.util.regex.Matcher()"

    • APERRY's avatar
      APERRY
      Occasional Contributor

      Hi rse 

       

      Thank you for the tip.

      I tried to modify the testrunner.sh, but when I ran the pipeline, the warning was alway here as well as this line (was not here before) :

       /usr/local/SmartBear/RunProject.sh: line 1: /usr/local/SmartBear/ReadyAPI-3.1.0/bin/testrunner.sh: Permission denied

      I guess I can't modify the testrunner of the Docker Image.