If spring:dependency-managment is not included the grpc server fails to start with the following error.
2026-06-26T18:15:54.018+05:30 WARN 30598 --- [demo] [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'nettyGrpcServerLifecycle'
2026-06-26T18:15:54.020+05:30 INFO 30598 --- [demo] [ main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2026-06-26T18:15:54.024+05:30 ERROR 30598 --- [demo] [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'nettyGrpcServerLifecycle'
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:423) ~[spring-context-7.0.8.jar:7.0.8]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:409) ~[spring-context-7.0.8.jar:7.0.8]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:613) ~[spring-context-7.0.8.jar:7.0.8]
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:379) ~[spring-context-7.0.8.jar:7.0.8]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:306) ~[spring-context-7.0.8.jar:7.0.8]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:1013) ~[spring-context-7.0.8.jar:7.0.8]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) ~[spring-context-7.0.8.jar:7.0.8]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) ~[spring-boot-4.1.0.jar:4.1.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-4.1.0.jar:4.1.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.1.0.jar:4.1.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) ~[spring-boot-4.1.0.jar:4.1.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-4.1.0.jar:4.1.0]
at com.example.demo.Application.main(Application.java:10) ~[main/:na]
Caused by: java.lang.AbstractMethodError: Receiver class io.grpc.netty.NettyServerBuilder$NettyClientTransportServersBuilder does not define or inherit an implementation of the resolved method 'abstract io.grpc.internal.InternalServer buildClientTransportServers(java.util.List, io.grpc.MetricRecorder)' of interface io.grpc.internal.ServerImplBuilder$ClientTransportServersBuilder.
at io.grpc.internal.ServerImplBuilder.build(ServerImplBuilder.java:261) ~[grpc-core-1.81.0.jar:1.81.0]
at io.grpc.ForwardingServerBuilder.build(ForwardingServerBuilder.java:201) ~[grpc-api-1.81.0.jar:1.81.0]
at org.springframework.grpc.server.DefaultGrpcServerFactory.createServer(DefaultGrpcServerFactory.java:115) ~[spring-grpc-core-1.1.0.jar:1.1.0]
at org.springframework.grpc.server.lifecycle.GrpcServerLifecycle.createAndStartGrpcServer(GrpcServerLifecycle.java:123) ~[spring-grpc-core-1.1.0.jar:1.1.0]
at org.springframework.grpc.server.lifecycle.GrpcServerLifecycle.start(GrpcServerLifecycle.java:72) ~[spring-grpc-core-1.1.0.jar:1.1.0]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:420) ~[spring-context-7.0.8.jar:7.0.8]
... 13 common frames omitted
Here is the build file ...
plugins {
id("java")
id("org.springframework.boot") version "4.1.0"
// id("io.spring.dependency-management") version "1.1.7"
id("com.google.protobuf") version "0.10.0"
}
group = "com.example"
version = "0.0.1-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
repositories {
mavenCentral()
}
dependencies {
// implementation(platform("org.springframework.boot:spring-boot-dependencies:4.1.0"))
implementation("org.springframework.boot:spring-boot-starter-grpc-server:4.1.0")
testImplementation("org.springframework.boot:spring-boot-starter-grpc-server-test:4.1.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<Test> {
useJUnitPlatform()
}
If
spring:dependency-managmentis not included the grpc server fails to start with the following error.Here is the build file ...