Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-14312

startup script java check can fail

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Rank:
      1|i00hlb:

      Description

      In functions.sh cdap_set_java, it tries to verify the java version by parsing the output of 'java -version'. It does this by assuming that the version starts with:

      1.version

      This is now always the case. On my mac, the output of java -version is:

      java version "10.0.1" 2018-04-17
      

      which will fail with:

      [ERROR] Java version not supported. Please install Java 8 - other versions of Java are not supported.
      

      It does this because it thinks my java version is "0". This error is also incorrect, higher versions are supported, it just needs to be at least java 8.

      We have seen another case where it is:

      java version "10" 2018-03-20
      

      In these scenarios, CDAP fails to startup, with error:

      [Error] Could not detect Java version. Aborting...
      

      Looks like we need to update the check for 1.x. If it does not conform to that pattern, just let it pass, as it's in the newer Java 10 format.

        Attachments

          Activity

            People

            • Assignee:
              priyanka Priyanka Nambiar
              Reporter:
              ashau Albert Shau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: