nflow icon indicating copy to clipboard operation
nflow copied to clipboard

issue while adding jetty server along with spring boot application

Open LokeshReddy63 opened this issue 2 years ago • 1 comments

ionConfigWebApplicationContext - [] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [io.nflow.jetty.config.NflowJettyConfiguration]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'statisticsResource' for bean class [io.nflow.rest.v1.jaxrs.StatisticsResource] conflicts with existing, non-compatible bean definition of same name and class [io.nflow.rest.v1.springweb.StatisticsResource]

getting above error when trying to add nflow jetty server to a spring boot application. can someone help me here ?

LokeshReddy63 avatar Mar 17 '22 17:03 LokeshReddy63

Sounds like StatisticsResource gets registered twice. It gets registered via NflowJettyConfiguration, try to find out where and then remove the additional registration.

efonsell avatar Mar 21 '22 09:03 efonsell