You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeremy Hanna (JIRA)" <ji...@apache.org> on 2016/05/18 15:50:12 UTC

[jira] [Resolved] (CASSANDRA-11832) Cassandra 2.1x and 2.2.x does not start with java 7u101

     [ https://issues.apache.org/jira/browse/CASSANDRA-11832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Hanna resolved CASSANDRA-11832.
--------------------------------------
    Resolution: Duplicate

> Cassandra 2.1x and 2.2.x does not start with java 7u101
> -------------------------------------------------------
>
>                 Key: CASSANDRA-11832
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11832
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Lifecycle
>         Environment: 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
>            Reporter: Paul Bayliss
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)