Error installing 'oraclejdk8': "Expected feature release number in range of 9 to 14, but got: 8"

Hi folks.

I have a build that used to work 0, but is now broken 1. It seems to be related to installing oraclejdk8:

$ ~/bin/install-jdk.sh --target “/home/travis/oraclejdk8” --workspace “/home/travis/.cache/install-jdk” --feature “8” --license “BCL”
install-jdk.sh 2019-05-02
Expected feature release number in range of 9 to 14, but got: 8
The command “~/bin/install-jdk.sh --target “/home/travis/oraclejdk8” --workspace “/home/travis/.cache/install-jdk” --feature “8” --license “BCL”” failed and exited with 3 during .

I haven’t changed the travis.yml since creating this project. Builds have never failed before installing oracle jdk 8, and now they are, yet I haven’t changed anything.

Furthermore, I have many other projects (e.g. 2, 3) that also use oraclejdk8 and build without error.

Can anyone offer insight as to what is going on? For example, why is it the project at 0 the only one to be affected (as far as I can tell)? Why is the build breaking even though I haven’t made changes to the build environment?

Many thanks,
Elliot

2 Likes

Hi,

I can confirm Elliot - I’ve the same issue with one of my many projects.
What is going on and how to solve this issue?

Thx in advance
Marten

1 Like

This is the same as OracleJDK 7 not supported on Precise?

I’m not sure Marten! This is all very confusing. How could Travis break my Java 8 builds without providing some kind of notice or additional information?

It looks like my last successful build (0) was using ‘Build dist: trusty’, and the failing build (1) is using ‘Build dist: xenial’.

As a workaround we used openjdk8 for our builds.

I’ve met the same problem those days, after tens of trials I found that this error is caused by the Ubuntu distribution used by task. For the one you stated as “working”, it’s running on trusty, and the errored one was running on xenial.

TO FIX THIS, add the following code to your .travis.yml file,

dist: trusty

To manually appoint the Ubuntu distribution version.

trusty is trusty for real

1 Like

See Install-jdk.sh failing for openjdk9 and 10 for context.

thanks!!!

Thanks for this information.

Thanks for all the replies, adding “dist: trusty” fixed my issue.

the question is: why did my build environment change under my feet? Kind of defeats the purpose if your build environment changes underneath of you without you knowing.

I have many many repositories that use Oracle JDK 8, and only a handful have been affected by this issue: as if some of my environments have been migrated to Xenial, while some have not.

1 Like

Hi everyone, similar error for me here (starting from today, previous builds were working), I tried with both oraclejdk8 and openjdk8:

https://travis-ci.org/pgp/XFiles/builds/575788859

https://travis-ci.org/pgp/XFiles/builds/575851496

It seems to me something has been modified in the install-jdk.sh script…

UPDATE:
build still failing with openjdk11 and bionic distro as well:
https://travis-ci.org/pgp/XFiles/builds/576767975

After further analysis, there seems to be some discrepancy between the machine instances of last working and first non-working build: with ‘dist’ parameter being unspecified, both reference dists are tagged as ‘bionic’, but the working one reports Ubuntu 12.04, while the non-working one reports Ubuntu 18.04 (this can be seen in ‘Worker information’ in the build log)

Last working build:
https://travis-ci.org/pgp/XFiles/builds/575008964
Raw log:
https://api.travis-ci.org/v3/job/575008965/log.txt

First non-working one:
https://travis-ci.org/pgp/XFiles/builds/575788859
Raw log:
https://api.travis-ci.org/v3/job/575788860/log.txt

The travis change of default dist may be related.

Looks like change of default distro from trusty to xenial got rolled out gradually, and if you didn’t specify dist, your default dist changed when it got rolled out, from trusty to something else, which made existing config stop working, but telling it to use trusty again made it work again?

Doens’t explain @pgp saying he saw things claiming to be xenial with different version numbers, that could be a different bug?

Hard to say.