Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10240

gradle regenerate fails on java 17

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.1
    • None
    • None
    • New

    Description

      When looking at LUCENE-10239, I tried to regenerate everything, but generateEmojiPropertiesInternal fails:

      Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:189)
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:170)
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:156)
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:277)
      

      For now I think I can workaround it, if i use an older JDK? But it seems strange for regenerate to fail, all other gradle tasks are working on JDK17. cc dweiss in case you have any ideas on what may cause this.

      think:lucene[LUCENE-10238]$ ./gradlew regenerate --rerun-tasks
      To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
      Daemon will be stopped at the end of the build
      > Task :buildSrc:compileJava
      > Task :buildSrc:compileGroovy NO-SOURCE
      > Task :buildSrc:processResources NO-SOURCE
      > Task :buildSrc:classes
      > Task :buildSrc:jar
      > Task :buildSrc:assemble
      > Task :buildSrc:compileTestJava NO-SOURCE
      > Task :buildSrc:compileTestGroovy NO-SOURCE
      > Task :buildSrc:processTestResources NO-SOURCE
      > Task :buildSrc:testClasses UP-TO-DATE
      > Task :buildSrc:test NO-SOURCE
      > Task :buildSrc:check UP-TO-DATE
      > Task :buildSrc:build
      > Task :lucene:backward-codecs:generateForUtilChecksumLoad
      > Task :lucene:expressions:generateAntlrChecksumLoad
      > Task :lucene:core:generateForUtilChecksumLoad
      > Task :lucene:backward-codecs:generateForUtilInternal
      > Task :lucene:core:generateForUtilInternal
      > Task :spotlessInternalRegisterDependencies
      > Task :lucene:core:generateStandardTokenizerChecksumLoad
      > Task :lucene:queryparser:javaccParserClassicChecksumLoad
      > Task :lucene:core:generateEmojiPropertiesChecksumLoad
      
      > Task :lucene:queryparser:javaccParserClassicInternal FAILED
      Recompiling JavaCC: lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj
      
      > Task :lucene:expressions:generateAntlrInternal FAILED
      > Task :lucene:backward-codecs:spotlessJava
      
      > Task :lucene:core:generateEmojiPropertiesInternal
      Caught: BUG! exception in phase 'semantic analysis' in source unit '/home/rmuir/workspace/lucene/gradle/generation/icu/GenerateEmojiProperties.groovy' Unsupported class file major version 61
      BUG! exception in phase 'semantic analysis' in source unit '/home/rmuir/workspace/lucene/gradle/generation/icu/GenerateEmojiProperties.groovy' Unsupported class file major version 61
      Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:189)
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:170)
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:156)
              at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:277)
      
      > Task :lucene:core:generateEmojiPropertiesInternal FAILED
      
      FAILURE: Build completed with 3 failures.
      
      1: Task failed with an exception.
      -----------
      * Where:
      Script '/home/rmuir/workspace/lucene/gradle/generation/regenerate.gradle' line: 74
      
      * What went wrong:
      Execution failed for task ':lucene:queryparser:javaccParserClassicInternal'.
      > java.lang.reflect.InvocationTargetException
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      ==============================================================================
      
      2: Task failed with an exception.
      -----------
      * Where:
      Script '/home/rmuir/workspace/lucene/gradle/generation/regenerate.gradle' line: 74
      
      * What went wrong:
      Execution failed for task ':lucene:expressions:generateAntlrInternal'.
      > java.lang.reflect.InvocationTargetException
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      ==============================================================================
      
      3: Task failed with an exception.
      -----------
      * Where:
      Script '/home/rmuir/workspace/lucene/gradle/generation/icu.gradle' line: 303
      
      * What went wrong:
      Execution failed for task ':lucene:core:generateEmojiPropertiesInternal'.
      > Process 'command '/usr/lib/jvm/java-17-openjdk/bin/java'' finished with non-zero exit value 1
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      ==============================================================================
      
      * Get more help at https://help.gradle.org
      
      BUILD FAILED in 21s
      15 actionable tasks: 15 executed
      

      Attachments

        Issue Links

          Activity

            People

              dweiss Dawid Weiss
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h