Привет в нашем приложении мы создаем определенные динамические потоки интеграции, которые мы удаляем и создаем в потоке.В основном все работало отлично, но мы наблюдали приведенную ниже ошибку, иногда особенно из-за потока интеграции, пытающегося удалить зависимые компоненты.Кто-то может прокомментировать, является ли это ошибкой или мы что-то упускаем.Трассировка ошибки ниже
java.lang.NullPointerException: null
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resetBeanDefinition(DefaultListableBeanFactory.java:912)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.removeBeanDefinition(DefaultListableBeanFactory.java:891)
at org.springframework.integration.dsl.context.IntegrationFlowContext.removeDependantBeans(IntegrationFlowContext.java:203)
at org.springframework.integration.dsl.context.IntegrationFlowContext.remove(IntegrationFlowContext.java:189) at
кода, удаляющего поток интеграции
flowContext.remove("flowId");
Обновление вызывающего кода
if (discoveryService.isFLowPresent(flowId))
{
LOG.debug("Removing and creating flow [{}]", flowId);
discoveryService.removeIntegrationFlow(fc.getFeedId());
LOG.debug("Removing Old Job and create fresh one with new params [{}]", flowId);
try
{
discoveryService.createFlow(fc.getFeedId());
}
catch (ExecutionException e)
{
throw new IllegalStateException("Error while starting flow for Integration adapter [{}]" + fc.getFeedId(), e);
}
}