I have some protocol buffer files generated with an older version of protoc. Compiling those fails if when I add contrib_rules_jvm to MODULES.bazel. I think contrib_rules_jvm is loading a different version of protocol buffers, and that version is added as a dependency when compiling the java_library.
You can reproduce with the following archive,
test-archive.zip
bazel build ... fails with
foo/FooOuterClass.java:99: error: cannot find symbol
makeExtensionsImmutable();
If I comment out bazel_dep(name = "contrib_rules_jvm", version = "0.28.0") in MODULE.bazel, then bazel build ... succeeds.