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

Exceptions logged on Java 8

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.7
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None
    • Environment:
      MacOS

      Description

      When using Groovy 3.0.7 on a JDK 8, the following exception is logged. This causes problems for other parties scanning logs for exceptions and users trying to find real problems. The exception in question doesn't seem to be a problem though as it is expected to not find Java 9 classes on Java 8. In  Groovy 2.x, this used to not log errors as it checked the java major version before loading the class.

       

      2021-02-09T10:13:25.639+0100 [DEBUG] [org.codehaus.groovy.vmplugin.VMPluginFactory] Trying to create VM plugin `org.codehaus.groovy.vmplugin.v9.Java9` by checking `java.lang.Module`, but failed:
      java.lang.ClassNotFoundException: java.lang.Modulejava.lang.ClassNotFoundException: java.lang.Module at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:419) at java.lang.ClassLoader.loadClass(ClassLoader.java:352) at org.codehaus.groovy.vmplugin.VMPluginFactory.lambda$createPlugin$0(VMPluginFactory.java:61) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.vmplugin.VMPluginFactory.createPlugin(VMPluginFactory.java:58) at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:45) at org.codehaus.groovy.reflection.ReflectionUtils.<clinit>(ReflectionUtils.java:47) at org.codehaus.groovy.reflection.CachedClass$3.lambda$initValue$1(CachedClass.java:90) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:546) at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
      

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bmuskalla Benjamin Muskalla
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: