Andrea Cosentino created CAMEL-24544:
----------------------------------------
Summary: camel-kserve / camel-tensorflow-serving: doStop can NPE
when the gRPC channel was never created
Key: CAMEL-24544
URL: https://issues.apache.org/jira/browse/CAMEL-24544
Project: Camel
Issue Type: Bug
Components: camel-ai
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
Fix For: 4.23.0
Both serving components shut the gRPC channel down unconditionally in the
endpoint lifecycle: KServeEndpoint (line 77) and TensorFlowServingEndpoint
(line 75) call channel.shutdown() with no null guard and no awaitTermination.
If doInit() failed before assigning channel (bad target, credentials error),
the field is still null and doStop()/shutdown throws a NullPointerException
that masks the original startup failure. Fix: guard with if (channel != null)
before shutdown, and add a bounded awaitTermination for a clean close.
_Claude Code on behalf of oscerd_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)