bazel: Illegal reflective access by com.google.protobuf.UnsafeUtil when running Bazel 0.17.1

Description of the problem / feature request:

I install Bazel 0.17.1 in a fresh ubuntu:xenial container using the installer.sh, and when I run bazel version it gives the following warnings:

bazel version Extracting Bazel installation… WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/root/.cache/bazel/_bazel_root/install/28c1d2ace0add449e21862ae9f2d2289/_embedded_binaries/A-server.jar) to field java.lang.String.value WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil 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 WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command “bazel shutdown”. Build label: 0.17.1 Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Fri Sep 14 10:39:25 2018 (1536921565) Build timestamp: 1536921565 Build timestamp as int: 1536921565

Feature requests: what underlying problem are you trying to solve with this feature?

I’m just not sure if that’s expected with the new version.

Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

docker run -it ubuntu:xenial bash
apt-get update && apt-get install -y wget unzip
wget https://github.com/bazelbuild/bazel/releases/download/0.17.1/bazel-0.17.1-installer-linux-x86_64.sh
chmod +x bazel-0.17.1-installer-linux-x86_64.sh
./chmod +x bazel-0.17.1-installer-linux-x86_64.sh
bazel version

What operating system are you running Bazel on?

ubuntu xenial docker container

What’s the output of bazel info release?

bazel info release WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/root/.cache/bazel/_bazel_root/install/28c1d2ace0add449e21862ae9f2d2289/_embedded_binaries/A-server.jar) to field java.lang.String.value WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil 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: The ‘info’ command is only supported from within a workspace. WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command “bazel shutdown”.

Have you found anything relevant by searching the web?

https://github.com/bazelbuild/bazel/issues/5599

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Several of us on Angular team observed this after update to 0.18

I’m getting it, and I quote: “From parsing Android resources for //path/to/package”.

Then I get the full set of warnings. It’d be superlatively nice to shut them up, especially since literally every android_library seems to be triggering it. I really don’t want to add it to every library target.