google / copybara

Copybara: A tool for transforming and moving code between repositories.
Apache License 2.0
2.13k stars 258 forks source link

Build failed use docker build #280

Closed ChaosEternal closed 5 months ago

ChaosEternal commented 7 months ago

Can't do docker build since commit: d82b4dadb4b6ae94b8cef1833965af9de24fc3a5.

the error message is as

ERROR: An error occurred during the fetch of repository 'maven':
   Traceback (most recent call last):
    File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl", line 1080, column 43, in _coursier_fetch_impl
        hasher_stdout = _execute_with_argsfile(
    File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl", line 188, column 13, in _execute_with_argsfile
        fail("Error while " + error_description + ": " + exec_result.stderr)
Error in fail: Error while obtaining the sha256 checksums: Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/bazelbuild/rules_jvm_external/Hasher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
ERROR: /home/ubuntu/WORKSPACE:23:28: fetching coursier_fetch rule //external:maven: Traceback (most recent call last):
    File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl", line 1080, column 43, in _coursier_fetch_impl
        hasher_stdout = _execute_with_argsfile(
    File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl", line 188, column 13, in _execute_with_argsfile
        fail("Error while " + error_description + ": " + exec_result.stderr)
Error in fail: Error while obtaining the sha256 checksums: Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/bazelbuild/rules_jvm_external/Hasher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
ERROR: /home/ubuntu/third_party/BUILD:159:13: //third_party:jsr305 depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while obtaining the sha256 checksums: Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/bazelbuild/rules_jvm_external/Hasher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
ERROR: Analysis of target '//java/com/google/copybara:copybara_deploy.jar' failed; build aborted: 
Davidnet commented 5 months ago

I am also not able to build the docker image, even with previous commits:

26.24 INFO: Repository maven instantiated at:
26.24   /home/ubuntu/WORKSPACE:23:28: in <toplevel>
26.24   /home/ubuntu/repositories.maven.bzl:66:10: in copybara_maven_repositories
26.24   /home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
26.24   /home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/private/rules/maven_install.bzl:103:19: in maven_install
26.24 Repository rule coursier_fetch defined at:
26.24   /home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl:1335:33: in <toplevel>
26.25 ERROR: An error occurred during the fetch of repository 'maven':
26.25    Traceback (most recent call last):
26.25   File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl", line 1080, column 43, in _coursier_fetch_impl
26.25           hasher_stdout = _execute_with_argsfile(
26.25   File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/dcf1cb88564cab74bbfd120b64688e93/external/rules_jvm_external/coursier.bzl", line 188, column 13, in _execute_with_argsfile
26.25           fail("Error while " + error_description + ": " + exec_result.stderr)
26.25 Error in fail: Error while obtaining the sha256 checksums: Error: A JNI error has occurred, please check your installation and try again
26.25 Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/bazelbuild/rules_jvm_external/Hasher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
hsudhof commented 5 months ago

0398d733e88516320f5bd59a74dc4c096d628579 Should fix this