Код: Выделить всё
java.lang.RuntimeException: org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper returned null
at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:228)
at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:178)
Код: Выделить всё
The java.lang.RuntimeException: org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper returned null error during StreamBridge.send calls typically arises when the function to invoke is not properly registered or is null at the time of invocation. This can occur in scenarios where a bean implementing SmartInitializingSingleton attempts to use StreamBridge.send before the function catalog is fully initialized, leading to a null function being cached and subsequently causing a NullPointerException. Similarly, if a consumer method attempts to use StreamBridge during application startup and the functionCatalog is not yet populated, the FunctionInvocationWrapper may be null, resulting in the same exception. The issue is exacerbated when the function registration happens after the afterSingletonsInstantiated phase, making the null state irrecoverable without a restart. This behavior is particularly problematic in environments like Azure Storage where message handlers are initialized early in the bootstrapping process.
spring boot 3.4.3
spring CloudStream Kafka Binder 4.3.1
Любая помощь приветствуется!>
Мобильная версия