New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java Oracle JDK 10 #9368

Closed
sormuras opened this Issue Mar 20, 2018 · 55 comments

Comments

Projects
None yet
@sormuras
Copy link

sormuras commented Mar 20, 2018

Oracle JDK 10 is not supported yet using jdk: oraclejdk10 in .travis.yml

OpenJDK 10 is installable from http://jdk.java.net/10/ ( using install-jdk.sh )

https://travis-ci.org/sormuras/sormuras.github.io/builds/355946365

PR: travis-ci/travis-build#1347

sormuras added a commit to forax/pro that referenced this issue Mar 20, 2018

Upgrade to JDK 10 General-Availability Release
Oracle JDK 10 is not yet available at Travis CI
travis-ci/travis-ci#9368

sormuras added a commit to sormuras/byte-buddy that referenced this issue Mar 20, 2018

Upgrade to JDK 10 General-Availability Release
As Oracle JDK 10 is no longer available from http://jdk.java.net/10/
the license option is flipped from `BCL` to `GPL`.
Travis CI does not yet provide an Oracle JDK 10 installation. See
travis-ci/travis-ci#9368 for details.

@travis-ci travis-ci deleted a comment from javadev Mar 21, 2018

@sormuras

This comment has been minimized.

Copy link
Author

sormuras commented Mar 21, 2018

Related to #8751

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Mar 22, 2018

No Java 10 package is available yet. https://launchpad.net/~webupd8team/+archive/ubuntu/java

@pivovarit

This comment has been minimized.

Copy link

pivovarit commented Apr 1, 2018

If you're looking for a working solution, I managed to get it working using just a handful lines of code:
pivovarit/articles@62dcbe7

@szpak

This comment has been minimized.

Copy link

szpak commented Apr 1, 2018

@pivovarit I hit the problem with:

ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target

on artifacts upload to Maven Central while using just "unzipped" the OpenJDK package. It might be needed to also link the system CA certificated.

@sormuras

This comment has been minimized.

Copy link
Author

sormuras commented Apr 2, 2018

Merged your -C feature into install-jdk.sh @szpak -- works like a charm on Travis CI

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Apr 2, 2018

Hi, everyone. If anyone is interested in testing with these newer JDK versions, please activate your repository on https://staging.travis-ci.org and report the results, please. I don't have any personally, and I can only test with java -version and javac -version, which is far less than ideal.

Thanks.

@sormuras

This comment has been minimized.

Copy link
Author

sormuras commented Apr 2, 2018

"Sorry, but JDK 'oraclejdk10' is not known." https://staging.travis-ci.org/sormuras/sormuras.github.io/jobs/715805

What's the name of the JDK at staging?

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Apr 2, 2018

travis-ci/travis-build@35435f6#diff-c3e62bf39421d7631effc5618ca5b5c0R67

@sormuras

Valid values are

'openjdk9'   
'openjdk10'  
'oraclejdk11'
'openjdk11'  

oraclejdk10 is not on this list because https://sormuras.github.io/blog/2018-03-20-jdk-matrix.html indicates to me that install-jdk.sh cannot handle it.

@sormuras

This comment has been minimized.

Copy link
Author

sormuras commented Jun 7, 2018

Users just configuring jdk: openjdkX on Travis CI will be surprised if their local openjdkX installation behaves differently.

In other words: Travis CI should always provide a pristine (unpatched) JDK installation.

If you need some patches applied to an OpenJDK installation, you still may use install-jdk.sh with any options passed you need.

Or resort to: jdk: oraclejdkX which still ships with more certificates. See http://openjdk.java.net/jeps/319 and https://bugs.openjdk.java.net/browse/JDK-8196141 for details.

@gavinkflam

This comment has been minimized.

Copy link

gavinkflam commented Jun 7, 2018

Thanks @sormuras!

Here is an minimal Travis CI configurations for people reading this in the future.
It involved manually symlinking the system CA certs in the before_install stage.

language: clojure
lein: 2.8.1

jdk:
  - openjdk8
  - oraclejdk8
  - oraclejdk9

matrix:
  include:
    - jdk: openjdk9
      before_install:
        - rm "${JAVA_HOME}/lib/security/cacerts"
        - ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"

Alternatively, you can do the JDK installation with a custom matrix as well.

Footnote: Self-answer on SO

@danielcompton

This comment has been minimized.

Copy link

danielcompton commented Jun 9, 2018

@gavinkflam I've written this fix up at https://www.deps.co/guides/travis-ci-latest-java/ with a bit more info about the feature and where it comes from.

@FibreFoX

This comment has been minimized.

Copy link

FibreFoX commented Jun 16, 2018

It seems JDK10 is working now, does this mean this issue is fixed? What is missing?

@tofi86

This comment has been minimized.

Copy link

tofi86 commented Jun 18, 2018

It seems JDK10 is working now

I can confirm it works without any tweaks. THANKS!

@rleigh-codelibre

This comment has been minimized.

Copy link

rleigh-codelibre commented Jun 18, 2018

It does work, but I've had a small number of failures of the java download script. Any reason JDK10 is not part of the base image?

@sormuras

This comment has been minimized.

Copy link
Author

sormuras commented Jun 18, 2018

@rleigh-codelibre Travis CI team is thinking about doing this: travis-ci/travis-build#1347 (comment)

Closing this issue as Oracle JDK 10 ( and many others: https://travis-ci.org/sormuras/sormuras.github.io ) is now supported.

@filiphr

This comment has been minimized.

Copy link

filiphr commented Jul 14, 2018

Not sure if it is related to this issue, but I am seeing

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

when trying to pull SNAPSHOT dependencies from sonatype-snapshots. It works on 11 and ea. Here is the entire build. When pulling from central it works ok see this build.

Haven't tried #9368 (comment) yet.

@sormuras

This comment has been minimized.

Copy link
Author

sormuras commented Jul 15, 2018

Haven't tried #9368 (comment) yet.

"manually symlinking the system CA certs" is needed for some https connections on openjdk10. Or switch to oraclejdk10.

See for example https://bugs.openjdk.java.net/browse/JDK-8196141 and related/linked issues.

@micheljung

This comment has been minimized.

Copy link

micheljung commented Jul 18, 2018

Still (no longer?) doesn't work for me; #9895

xor-freenet added a commit to xor-freenet/plugin-WebOfTrust that referenced this issue Sep 26, 2018

davidxia added a commit to spotify/docker-maven-plugin that referenced this issue Oct 9, 2018

Fix Travis CI builds for openjdk[9|10]
Travis CI builds for openjdk[9|10] currently fail with

```
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
```

when trying to pull SNAPSHOT dependencies from Sonatype.

Fix by manually symlinking the system CA certs in the before_install stage.

See travis-ci/travis-ci#9368 (comment).

davidxia added a commit to spotify/docker-maven-plugin that referenced this issue Oct 9, 2018

Fix Travis CI builds for openjdk[9|10]
Travis CI builds for openjdk[9|10] currently fail with

```
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
```

when trying to pull SNAPSHOT dependencies from Sonatype.

Fix by manually symlinking the system CA certs in the before_install stage.

See travis-ci/travis-ci#9368 (comment).

davidxia added a commit to spotify/docker-maven-plugin that referenced this issue Oct 9, 2018

Fix Travis CI builds for openjdk[9|10]
Travis CI builds for openjdk[9|10] currently fail with

```
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
```

when trying to pull dependencies from Sonatype.

Fix by manually symlinking the system CA certs in the before_install stage.

See travis-ci/travis-ci#9368 (comment).

aslakhellesoy added a commit to cucumber/cucumber that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

cukebot pushed a commit to cucumber/c21e-java that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

cukebot pushed a commit to cucumber/config-java that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

cukebot pushed a commit to cucumber/cucumber-expressions-java that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

cukebot pushed a commit to cucumber/datatable-java that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

cukebot pushed a commit to cucumber/gherkin-java that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

cukebot pushed a commit to cucumber/tag-expressions-java that referenced this issue Oct 28, 2018

Stop building on openjdk9 and openjdk10 because SNAPSHOT dependencies…
… cannot be downloaded.

We get the error message "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

There are workarounds for this described in travis-ci/travis-ci#9368
but rather than using those workarounds I think it's OK to skip these jdks.

saudet added a commit to bytedeco/javacpp that referenced this issue Nov 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment