Skip to content

Commit c4ca252

Browse files
committed
fix: exclude protobuf-javalite to resolve Bazel protobuf runtime conflicts
rocketmq-proto:2.1.2 transitively depends on grpc-protobuf-lite, which pulls in protobuf-javalite. This artifact contains classes in the same com.google.protobuf package as protobuf-java but with an incompatible class hierarchy (GeneratedMessageLite vs GeneratedMessageV3). When both jars are on the classpath, the wrong classes get loaded, causing: - NoSuchMethodError: TimestampProto.getDescriptor() (lite has no descriptors) - VerifyError: Duration not assignable to AbstractMessage (lite Duration extends GeneratedMessageLite, not AbstractMessage) Maven pom.xml avoids this by excluding all transitive deps from rocketmq-proto. Apply the equivalent in Bazel via excluded_artifacts.
1 parent 980fb7f commit c4ca252

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

WORKSPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ maven_install(
126126
"com.alibaba.fastjson2:fastjson2:2.0.59",
127127
"org.junit.jupiter:junit-jupiter-api:5.9.1",
128128
],
129+
excluded_artifacts = [
130+
"com.google.protobuf:protobuf-javalite",
131+
],
129132
fetch_sources = False,
130133
repositories = [
131134
"https://repo1.maven.org/maven2",

0 commit comments

Comments
 (0)