Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
When plugin id specified, "gradle tasks" results in java.security.InvalidKeyException: EC parameters error #2421
Running "gradle tasks" should successfully retrieve the plugin specified, then show the list of tasks.
Running "gradle tasks" results in "FAILURE: Build failed with an exception." ... Error resolving plugin [id: ...> Could not GET 'https://plugins.gradle.org/...' ... > java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
When I run --stacktrace, the root exception appears to be:
Caused by: java.security.NoSuchProviderException: no such provider: SunEC
I am trying to use a plugin: id 'org.openrepose.gradle.plugins.jaxb' version '2.2.3' in a build script to run a simple example.
Steps to Reproduce (for bugs)
Trisquel GNU/Linux 7.0 amd64 (Similar to Ubuntu 14.04)
By following instructions at https://bouncycastle.org/specifications.html under "6.0 Bouncy Castle Provider" and making BouncyCastle the number 1 provider, the issue is worked around.
So this could be an issue with OpenJDK or Debian. But it would be extra nice if the TLS endpoint at plugins.gradle.org would work with openjdk 7 on these platforms out of the box, probably would be some configuration change to use something other than EC.
FWIW, I have the same error on Travis CI (Ubuntu 14.04 (Trusty)) with OpenJDK 7, when the wrapper attempts to download the distribution from
Googling a bit, I found that others have had the same error as far back as 2 months ago: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/2479 (openjdk 7 too, if the ruby:2.1 docker image is the one from the Docker Hub, then it was based on Debian Jessie; in the log, you'll see that
Others could download from
It looks like Cloudflare would use an ECDHE cipher with Java 7, but the EC cipher suites aren't supported by default on OpenJDK 7 (at least as packaged by Debian and Ubuntu). Compare https://packages.ubuntu.com/trusty/amd64/openjdk-7-jre-headless/filelist (no
added a commit
Aug 3, 2017
referenced this issue
Aug 3, 2017
@jameskleeh A workaround: running
install: - JAVA_HOME=$(jdk_switcher home openjdk8) ./gradlew classes testClasses
added a commit
Aug 16, 2017
Good workaround - for me, using Codeship rather than Travis, my project build setup script was:
CodeShip doesn't have openjdk8 for some reason, so primed the pump with oraclejdk8.
I am seeing the same problem for the TestNG builds as well. https://travis-ci.org/cbeust/testng/jobs/271191856
Can someone please tell me what should be done to get this sorted out ?
@krmahadevan There are a few workarounds, any of these should work: