grpc/grpc-java · error · UnsupportedOperationException
Not implemented
Error message
Not implemented
What it means
LoadBalancer.createResolvingOobChannelBuilder(String) is a deprecated base-class stub in grpc-java that throws UnsupportedOperationException by default. Concrete LoadBalancer implementations are expected to override it; the base implementation exists only to preserve API compatibility. It is deprecated in favor of the credentials-aware overload, so calling the unoverridden default always fails.
Source
Thrown at api/src/main/java/io/grpc/LoadBalancer.java:1175
* on {@link ManagedChannelBuilder#forTarget} for the format of a target string.
*
* <p>The target string will be resolved by a {@link NameResolver} created according to the
* target string.
*
* <p>The returned oob-channel builder defaults to use the same authority and ChannelCredentials
* (without bearer tokens) as the parent channel's for authentication. This is different from
* {@link #createResolvingOobChannelBuilder(String, ChannelCredentials)}.
*
* <p>The LoadBalancer is responsible for closing unused OOB channels, and closing all OOB
* channels within {@link #shutdown}.
*
* @deprecated Use {@link #createResolvingOobChannelBuilder(String, ChannelCredentials)}
* instead.
* @since 1.31.0
*/
@Deprecated
public ManagedChannelBuilder<?> createResolvingOobChannelBuilder(String target) {
throw new UnsupportedOperationException("Not implemented");
}
/**
* Creates an out-of-band channel builder for LoadBalancer's own RPC needs, e.g., talking to an
* external load-balancer service, that is specified by a target string and credentials. See
* the documentation on {@link Grpc#newChannelBuilder} for the format of a target string.
*
* <p>The target string will be resolved by a {@link NameResolver} created according to the
* target string.
*
* <p>The LoadBalancer is responsible for closing unused OOB channels, and closing all OOB
* channels within {@link #shutdown}.
*
* @since 1.35.0
*/
public ManagedChannelBuilder<?> createResolvingOobChannelBuilder(
String target, ChannelCredentials creds) {
throw new UnsupportedOperationException();View on GitHub (pinned to 64daddc1f3)
Solutions
- Switch to the non-deprecated overload createResolvingOobChannelBuilder(String target, ChannelCredentials creds), which concrete implementations override
- Use createOobChannel(ResolvedServerAddresses) / createResolvingOobChannel alternative entry points on the LoadBalancer.Helper if credentials handling is done elsewhere
- Upgrade or fix the LoadBalancer implementation so it overrides createResolvingOobChannelBuilder; never call the deprecated base stub directly
- Catch UnsupportedOperationException and fall back to a locally built channel via ManagedChannelBuilder.forTarget(target)
Example fix
// before ManagedChannelBuilder<?> b = helper.createResolvingOobChannelBuilder(target); // after ManagedChannelBuilder<?> b = helper.createResolvingOobChannelBuilder(target, InsecureChannelCredentials.create());
Defensive patterns
Strategy: try-catch
Validate before calling
// Java: prefer the credentials overload outright ManagedChannelBuilder<?> b = helper.createResolvingOobChannelBuilder(target, creds); // never the deprecated String-only stub
Try / catch
try {
builder = helper.createResolvingOobChannelBuilder(target);
} catch (UnsupportedOperationException e) {
builder = helper.createResolvingOobChannelBuilder(target, InsecureChannelCredentials.create());
} Prevention
- Never call the deprecated single-argument createResolvingOobChannelBuilder; use the (String, ChannelCredentials) overload
- Ensure custom LoadBalancer implementations override createResolvingOobChannelBuilder
- Search the codebase for usages of this deprecated method during grpc-java upgrades
When it happens
Trigger: Calling the single-argument createResolvingOobChannelBuilder(target) on a LoadBalancer (or a third-party/custom LoadBalancer) that has not overridden it — the inherited base method throws immediately.
Common situations: Custom or third-party LoadBalancer implementations that predate the credentials-aware overload; code that still uses the deprecated String-target variant instead of createResolvingOobChannelBuilder(String, ChannelCredentials); library versions where implementers never overrode this stub.
Related errors
- Can't set TLS settings for ALTS
- Not implemented
- Not implemented
- This method is deprecated and marked for removal. Use the ge
- Use forPort(int, ServerCredentials) instead
AI-assisted analysis of grpc/grpc-java@64daddc1f3 (2026-09-08).
Data as JSON: /api/errors/0104844cb212519b.
Report an issue: GitHub.