Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15050

JDK7 compatibility broken in cassandra-2.2 by CASSANDRA-14821

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.2.15
    • Component/s: Build
    • Labels:
      None

      Description

      CASSANDRA-14821 introduced some errors on JDK7. The build fails as follows:

      (cassandra-2.2)mshuler@mana:~/git/cassandra$ java -version
      java version "1.7.0_80"
      Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
      
      (cassandra-2.2)mshuler@mana:~/git/cassandra$ ant jar
      Buildfile: /home/mshuler/git/cassandra/build.xml
      
      init:
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/classes/main
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/classes/thrift
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/test/lib
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/test/classes
         [mkdir] Created dir: /home/mshuler/git/cassandra/src/gen-java
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/lib
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/jacoco
         [mkdir] Created dir: /home/mshuler/git/cassandra/build/jacoco/partials
      
      maven-ant-tasks-localrepo:
          [copy] Copying 1 file to /home/mshuler/git/cassandra/build
      
      maven-ant-tasks-download:
      
      maven-ant-tasks-init:
      
      maven-declare-dependencies:
      
      maven-ant-tasks-retrieve-build:
      [artifact:dependencies] Building ant file: /home/mshuler/git/cassandra/build/build-dependencies.xml
      [artifact:dependencies] Building ant file: /home/mshuler/git/cassandra/build/build-dependencies-sources.xml
          [copy] Copying 65 files to /home/mshuler/git/cassandra/build/lib/jars
          [copy] Copying 41 files to /home/mshuler/git/cassandra/build/lib/sources
          [copy] Copying 25 files to /home/mshuler/git/cassandra/build/lib/jars
         [unzip] Expanding: /home/mshuler/git/cassandra/build/lib/jars/org.jacoco.agent-0.7.5.201505241946.jar into /home/mshu
      ler/git/cassandra/build/lib/jars
      
      check-gen-cql3-grammar:
      
      gen-cql3-grammar:
          [echo] Building Grammar /home/mshuler/git/cassandra/src/java/org/apache/cassandra/cql3/Cql.g  ...
      
      generate-cql-html:
      
      build-project:
          [echo] apache-cassandra: /home/mshuler/git/cassandra/build.xml
         [javac] Compiling 45 source files to /home/mshuler/git/cassandra/build/classes/thrift
         [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'org.openjdk.jmh.generators.Benchmark
      Processor' less than -source '1.7'
         [javac] Note: /home/mshuler/git/cassandra/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java uses o
      r overrides a deprecated API.
         [javac] Note: Recompile with -Xlint:deprecation for details.
         [javac] Note: Some input files use unchecked or unsafe operations.
         [javac] Note: Recompile with -Xlint:unchecked for details.
         [javac] 1 warning
         [javac] Compiling 1171 source files to /home/mshuler/git/cassandra/build/classes/main
         [javac] Note: Processing compiler hints annotations
         [javac] warning: Supported source version 'RELEASE_6' from annotation processor 'org.openjdk.jmh.generators.Benchmark
      Processor' less than -source '1.7'
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:22: error: package java.uti
      l.function does not exist
         [javac] import java.util.function.Consumer;
         [javac]                          ^
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:203: error: cannot find sym
      bol
         [javac]         private Consumer<Exception> handler;
         [javac]                 ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:204: error: cannot find sym
      bol
         [javac]         OnException(Consumer<Exception> handler)
         [javac]                     ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] Note: Processing compiler hints annotations
         [javac] Note: Writing compiler command file at META-INF/hotspot_compiler
         [javac] Note: Done processing compiler hints annotations
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:22: error: package java.uti
      l.function does not exist
         [javac] import java.util.function.Consumer;
         [javac]                          ^
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:203: error: cannot find sym
      bol
         [javac]         private Consumer<Exception> handler;
         [javac]                 ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:204: error: cannot find sym
      bol
         [javac]         OnException(Consumer<Exception> handler)
         [javac]                     ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:181: error: cannot find sym
      bol
         [javac]         THROW(new Consumer<Exception>()
         [javac]                   ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:188: error: cannot find sym
      bol
         [javac]         LOG(new Consumer<Exception>()
         [javac]                 ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] /home/mshuler/git/cassandra/src/java/org/apache/cassandra/utils/MBeanWrapper.java:195: error: cannot find sym
      bol
         [javac]         IGNORE(new Consumer<Exception>()
         [javac]                    ^
         [javac]   symbol:   class Consumer
         [javac]   location: class OnException
         [javac] Note: Some input files use or override a deprecated API.
         [javac] Note: Recompile with -Xlint:deprecation for details.
         [javac] Note: Some input files use unchecked or unsafe operations.
         [javac] Note: Recompile with -Xlint:unchecked for details.
         [javac] 6 errors
         [javac] 1 warning
      
      BUILD FAILED
      /home/mshuler/git/cassandra/build.xml:832: Compile failed; see the compiler error output for details.
      
      Total time: 42 seconds
      

      cc: Alex PetrovBenedict Elliott Smith, [~djoshi3]

        Attachments

        1. 15050-2.2_v2.txt
          2 kB
          Michael Shuler
        2. 15050-2.2.txt
          4 kB
          Ted Petersson
        3. cassandra-2.2_ci.png
          71 kB
          Michael Shuler

          Issue Links

            Activity

              People

              • Assignee:
                etedpet Ted Petersson
                Reporter:
                mshuler Michael Shuler
                Authors:
                Ted Petersson
                Reviewers:
                Michael Shuler
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: