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

Cassandra 2.1x and 2.2.x does not start with java 7u101

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • Linux xxxxxx 3.13.0-63-generic #103-Ubuntu SMP Fri Aug 14 21:42:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
      Java version 1.7.0.101

    • Normal

    Description

      Cassandra returns the error 'Cassandra 2.0 and later require Java 7u25 or later.' when run using java 7 versions greater than 7u101. This is due to using string comparisons for the versions in the cassandra-env.sh file.

      The current cassandra-env.sh script contains the following code which uses string comparisons (I.e. 101 is less than 25 if you compare as strings)

      if [ "$JVM_VERSION" \< "1.8" ] && [ "$JVM_PATCH_VERSION" \< "25" ] ; then
      echo "Cassandra 2.0 and later require Java 7u25 or later."
      exit 1;
      fi

      To properly handle the numeric version comparison the -lt operator should be used. For example

      if [ "$JVM_VERSION" \< "1.8" ] && [ "$JVM_PATCH_VERSION" -lt "25" ] ; then
      echo "Cassandra 2.0 and later require Java 7u25 or later."
      exit 1;
      fi

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              prbayliss1 Paul Bayliss
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: