Old java version in bionic

I added this lines to before_install:

  • sudo apt-get update
  • sudo apt-get upgrade
  • java -version

The output is:
java -version
openjdk version “11.0.2” 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

If i run this command on our production server, then i get:
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -version
openjdk version “11.0.4” 2019-07-16

I would expect to have the same java version in travis.

I think there is a bug in the Version 11.0.2 which causes our build to fail.

Build url: https://travis-ci.org/MyCoRe-Org/mycore/builds/571887611

When reporting problems, please point to relevant build URLs. Thanks.

The relevant build url is: https://travis-ci.org/MyCoRe-Org/mycore/builds/571887611

We hit a similar problem and we needed OpenJDK 11.0.3 or later (in our case due to https://bugs.openjdk.java.net/browse/JDK-8212885), and like you also noticed that Travis CI seems to be eternally stuck on 11.0.2 … :crying_cat_face:

In https://issues.apache.org/jira/browse/FINERACT-937, we gathered that this is because https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_jdk/files/install-jdk.sh#L200 is hard-coded to 11.0.2.

We managed to work around this by wiping Travis’ (bad, old, outdated) JDK, and just installing our own; see https://github.com/apache/fineract/pull/846 for exactly how we did that.

I’ve also posted a Feature Request for this on Use (latest) Java point versions from Ubuntu packages, instead of hard-coding old fix versions from java.net in install-jdk.sh