Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.23.0
    • None
    • None

    Description

      JDK 14 will be released on 2020/03/17.

      I tried building Calcite on an early access build and got an error from Gradle:

      $ java -version
      openjdk version "14" 2020-03-17
      OpenJDK Runtime Environment (build 14+36-1461)
      OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
      $ ./gradlew build
      Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details
      java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
              at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
              at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
              at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:107)
      ...
      $ ./gradlew clean --stacktrace
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
      
      * Try:
      Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      
      * Exception is:
      java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
              at org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.<init>(DefaultExtraPropertiesExtension.java:29)
              at org.gradle.internal.extensibility.DefaultConvention.<init>(DefaultConvention.java:49)
              at org.gradle.internal.extensibility.ExtensibleDynamicObject.<init>(ExtensibleDynamicObject.java:60)
      ...
      

      Problem appears to be https://github.com/gradle/gradle/issues/10248, which is related to (caused by) GROOVY-9211, and alrso related to NETBEANS-3876.

      Attachments

        Issue Links

          Activity

            hyuan Haisheng Yuan added a comment -

            Resolved in release 1.23.0 (2020-05-24).

            hyuan Haisheng Yuan added a comment - Resolved in release 1.23.0 (2020-05-24).
            danny0405 Danny Chen added a comment -

            Fixed in f1b2d3c !

            danny0405 Danny Chen added a comment - Fixed in f1b2d3c !
            julianhyde Julian Hyde added a comment -

            The upgrade to Gradle 6.3 already happened in c60f6750. This change just updates the release notes saying that JDK 14 is supported.

            Also it says that we support guava-28.2-jre. The contract of ImmutableList.removeIf seems to have changed - it now throws even if the list is empty, or no elements are removed - so I needed to fix a couple of places.

            Please review the PR #1896.

            julianhyde Julian Hyde added a comment - The upgrade to Gradle 6.3 already happened in c60f6750 . This change just updates the release notes saying that JDK 14 is supported. Also it says that we support guava-28.2-jre. The contract of ImmutableList.removeIf seems to have changed - it now throws even if the list is empty, or no elements are removed - so I needed to fix a couple of places. Please review the PR #1896 .
            julianhyde Julian Hyde added a comment -

            Per Gradle GitHub conversation there will likely be a Gradle 6.3 at the end of this week that uses Groovy 2.5.10 and works on JDK 14.

            julianhyde Julian Hyde added a comment - Per Gradle GitHub conversation there will likely be a Gradle 6.3 at the end of this week that uses Groovy 2.5.10 and works on JDK 14.
            julianhyde Julian Hyde added a comment -

            There's now a fixed version of Groovy but Gradle hasn't been updated to use it.

            julianhyde Julian Hyde added a comment - There's now a fixed version of Groovy but Gradle hasn't been updated to use it .
            julianhyde Julian Hyde added a comment -

            Thanks krisden. JDK 14 build support isn't urgent for us - indications are that if you build on JDK 8 through 13 the JARs will run fine on 14. But by linking to GROOVY-9211 we've added our vote.

            julianhyde Julian Hyde added a comment - Thanks krisden . JDK 14 build support isn't urgent for us - indications are that if you build on JDK 8 through 13 the JARs will run fine on 14. But by linking to GROOVY-9211 we've added our vote.
            krisden Kevin Risden added a comment -

            FWIW Lucene/Solr ran into something similar with Gradle and early builds of JDK:

            http://mail-archives.apache.org/mod_mbox/lucene-dev/202001.mbox/%3C000001d5c648%24d7eff570%2487cfe050%24%40thetaphi.de%3E

            No real solutions there, but pointed out how Gradle currently isn't friendly to newer JDKs due to Groovy it looks like.

            krisden Kevin Risden added a comment - FWIW Lucene/Solr ran into something similar with Gradle and early builds of JDK: http://mail-archives.apache.org/mod_mbox/lucene-dev/202001.mbox/%3C000001d5c648%24d7eff570%2487cfe050%24%40thetaphi.de%3E No real solutions there, but pointed out how Gradle currently isn't friendly to newer JDKs due to Groovy it looks like.
            julianhyde Julian Hyde added a comment -

            I tried building based on a commit (ce0118b41) that is on the master branch, still using Maven, just before we migrated to Gradle. Build and tests succeed.

            This is good news, because it means Calcite code & tests are not using any APIs that have been removed in JDK 14.

            However I suspect that we will need to upgrade Gradle, and that Gradle version does not yet exist.

            julianhyde Julian Hyde added a comment - I tried building based on a commit ( ce0118b41 ) that is on the master branch, still using Maven, just before we migrated to Gradle. Build and tests succeed. This is good news, because it means Calcite code & tests are not using any APIs that have been removed in JDK 14. However I suspect that we will need to upgrade Gradle, and that Gradle version does not yet exist.

            People

              julianhyde Julian Hyde
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: