iay / mdq-server

Metadata Query Protocol server implementation using Shibboleth MDA
6 stars 6 forks source link

Maven throws SunCertPathBuilderException when building mdq-server on Mac OS X #44

Closed xenophonf closed 7 years ago

xenophonf commented 7 years ago

On Mac OS X 10.11.6 with Oracle JDK 1.8.0_92 and Apache Maven 3.3.9 (the maven3 package from MacPorts), Maven reports the following error when it tries to download the uk.org.ukfederation:ukf-mda:pom:0.9.4 artifact:

[ERROR] Failed to execute goal on project mdq-server: Could not resolve dependencies for project uk.org.iay.mdq:mdq-server:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at uk.org.ukfederation:ukf-mda:jar:0.9.4: Failed to read artifact descriptor for uk.org.ukfederation:ukf-mda:jar:0.9.4: Could not transfer artifact uk.org.ukfederation:ukf-mda:pom:0.9.4 from/to ukf (https://apps.iay.org.uk/nexus/content/repositories/ukf): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

I'd thought that perhaps the JVM didn't trust the apps.iay.org.uk certificate, but when I tried to add the Let's Encrypt X3 certificate to the cacerts keystore, keytool said that the certificate was already trusted (alias ... already exists).

iay commented 7 years ago

This is a bit surprising, as Mac OS X is where I develop this code. I tried, but could not reproduce it in my current environment:

My suspicion is that it's the Java version that is the problem, as the appropriate CA wasn't added until something around 1.8.0_101 (July 2016). I don't know why adding it manually didn't work.

Can you update to a current version of Java and try again?

iay commented 7 years ago

I note while reading through some Oracle stuff that there is an Oracle Critical Patch Update literally tomorrow (2017-04-18) so if you want the very latest you might feel it's worth waiting for that.

iay commented 7 years ago

Closing on the basis that it's probably the JDK issue. Please reopen if that turns out not to be the case.