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

JDK 11 prints warning about org.codehaus.groovy.reflection.ReflectionUtils

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.0.0-beta-3
    • None
    • groovy-runtime
    • None
    • macOS X 10.14.6

    Description

      Get the following warning:

      WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/Volumes/PROMISE_PEGASUS/Development/repository/maven/repository/org/codehaus/groovy/groovy/3.0.0-beta-3/groovy-3.0.0-beta-3.jar) to method java.net.URLClassLoader.findClass(java.lang.String)WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/Volumes/PROMISE_PEGASUS/Development/repository/maven/repository/org/codehaus/groovy/groovy/3.0.0-beta-3/groovy-3.0.0-beta-3.jar) to method java.net.URLClassLoader.findClass(java.lang.String) at org.codehaus.groovy.reflection.ReflectionUtils.makeAccessible(ReflectionUtils.java:204) at org.codehaus.groovy.reflection.ReflectionUtils.makeAccessible(ReflectionUtils.java:196) at org.codehaus.groovy.reflection.ReflectionUtils$1.run(ReflectionUtils.java:189) at org.codehaus.groovy.reflection.ReflectionUtils$1.run(ReflectionUtils.java:187) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.reflection.ReflectionUtils.makeAccessibleInPrivilegedAction(ReflectionUtils.java:187) at org.codehaus.groovy.reflection.CachedMethod.makeAccessibleIfNecessary(CachedMethod.java:380) at org.codehaus.groovy.reflection.CachedMethod.setAccessible(CachedMethod.java:155) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.<init>(PojoMetaMethodSite.java:182) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.<init>(PojoMetaMethodSite.java:207) at org.codehaus.groovy.reflection.CachedMethod.createPojoMetaMethodSite(CachedMethod.java:313) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createCachedMethodSite(PojoMetaMethodSite.java:159) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createPojoMetaMethodSite(PojoMetaMethodSite.java:148) at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3525) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:131) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:165) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) at [Edit: code line doing: classloader.findClass(name) ] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:123) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1048) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:37) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) at org.codehaus.groovy.runtime.callsite.BooleanReturningMethodInvoker.invoke(BooleanReturningMethodInvoker.java:49) at org.codehaus.groovy.runtime.callsite.BooleanClosureWrapper.call(BooleanClosureWrapper.java:52) at org.codehaus.groovy.runtime.DefaultGroovyMethods.find(DefaultGroovyMethods.java:4348) at org.codehaus.groovy.runtime.dgm$233.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)

      Note that I did an edit in the stack trace above, replacing the reference to the line in my class which you cannot see, to the code executing on that line which is a call to ClassLoader.findClass(name). Probably not relevant, but just in case.

      As usual in Jira you are either in hell or in heaven but never on earth, so setting priority is hard. I left it at Major since as I understand it, this is something that will fail rather than warn in JDK 12.

       

       

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            tombensve Tommy Svensson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: