Repository navigation
Closed
Labels
team-Rules-JavaIssues for Java rules
Description
Description of the problem / feature request:
After upgrading to v0.17.1, our code no longer builds due to the following error:
ERROR: /tmp/tmp.IHyMu87aES--dr-mkfoss/javatests/google/registry/proxy/BUILD:10:1: Building javatests/google/registry/proxy/libproxy-class.jar (29 source files) and running annotation processors (ComponentProcessor) failed (Exit 1)
javatests/google/registry/proxy/handler/SslClientInitializerTest.java:49: error: package sun.security.provider.certpath does not exist
import sun.security.provider.certpath.SunCertPathBuilderException;
^
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
$ git clone https://github.com/google/nomulus.git && cd nomulus
$ bazel build //javatests/google/registry/proxy
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/bazelbuild/rules_docker/archive/v0.4.0.tar.gz) = 6dede2c65ce86289969b907f343a1382d33c14fbce5e30dd17bb59bb55bb6593
INFO: Analysed target //javatests/google/registry/proxy:proxy (137 packages loaded).
INFO: Found 1 target...
INFO: From Building external/com_google_protobuf/libprotobuf_java.jar (77 source files, 1 source jar) [for host]:
warning: [options] source value 1.6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
INFO: From Building external/com_google_protobuf/libprotobuf_java.jar (77 source files, 1 source jar):
warning: [options] source value 1.6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
INFO: From Generating SOY v2 Java files //java/google/registry/flows:soy_java_wrappers_files:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/local/google/home/jianglai/.cache/bazel/_bazel_jianglai/07a62f1737d31e5e75c35ed0215c5b46/external/com_google_inject_guice/guice-4.1.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR: /usr/local/google/home/jianglai/Downloads/nomulus/javatests/google/registry/proxy/BUILD:10:1: Building javatests/google/registry/proxy/libproxy-class.jar (29 source files) and running annotation processors (ComponentProcessor) failed (Exit 1)
javatests/google/registry/proxy/handler/SslClientInitializerTest.java:49: error: package sun.security.provider.certpath does not exist
import sun.security.provider.certpath.SunCertPathBuilderException;
^
Target //javatests/google/registry/proxy:proxy failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 92.856s, Critical Path: 66.19s
INFO: 327 processes: 302 linux-sandbox, 25 worker.
FAILED: Build did NOT complete successfully
What operating system are you running Bazel on?
$ uname -a
Linux jianglai.nyc.corp.google.com 4.17.0-3rodete2-amd64 #1 SMP Debian 4.17.17-1rodete2 (2018-08-28) x86_64 GNU/Linux
What's the output of bazel info release?
$ bazel info release
release 0.17.1
Any other information, logs, or outputs that you want to share?
I think this has to do project jigsaw? Is sun.security.provider.certpath no longer provided in the default root module? Is there a known solution?
Thanks.
Metadata
Metadata
Labels
team-Rules-JavaIssues for Java rules
Activity
cushon commentedon Sep 14, 2018
I think that's accurate:
This is related to JDK-8206937.
jianglai commentedon Sep 14, 2018
Any temporary workaround?
cushon commentedon Sep 14, 2018
That test is the only use of
sun.security.provider.certpath.SunCertPathBuilderException. Do you care if the exception is thesun.securitytype, or could you test forjava.security.cert.CertPathBuilderExceptioninstead?Remove a reference to sun.security.provider.certpath.SunCertPathBuild…
cushon commentedon Sep 14, 2018
@jianglai I opened a PR: google/nomulus#82
jianglai commentedon Sep 15, 2018
Thanks, it worked!
cushon commentedon Sep 15, 2018
Thanks for confirming! I'll leave this bug open to track the underlying problem.
Remove a reference to sun.security.provider.certpath
cushon commentedon Sep 18, 2018
I started #6179 to track the underlying problem.