Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
Istanbul Release
-
None
Description
CPS Core is not able to start because of intermittent unresolvable circular reference during Spring beans initialization.
Detected in: Istanbul release (onap/cps-and-ncmp:2.0.3)
2022-02-01 23:18:25,026 - WARN [main ] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'notificationService' defined in URL [jar:file:/app/libs/cps-service-2.0.3.jar!/org/onap/cps/notification/NotificationService.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cpsDataUpdatedEventFactory' defined in URL [jar:file:/app/libs/cps-service-2.0.3.jar!/org/onap/cps/notification/CpsDataUpdatedEventFactory.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cpsDataServiceImpl': Unsatisfied dependency expressed through field 'notificationService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'notificationService': Requested bean is currently in creation: Is there an unresolvable circular reference? 2022-02-01 23:18:25,157 - ERROR [main ] o.s.b.d.LoggingFailureAnalysisReporter - *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: ┌─────┐ | notificationService defined in URL [jar:file:/app/libs/cps-service-2.0.3.jar!/org/onap/cps/notification/NotificationService.class] ↑ ↓ | cpsDataUpdatedEventFactory defined in URL [jar:file:/app/libs/cps-service-2.0.3.jar!/org/onap/cps/notification/CpsDataUpdatedEventFactory.class] ↑ ↓ | cpsDataServiceImpl (field private org.onap.cps.notification.NotificationService org.onap.cps.api.impl.CpsDataServiceImpl.notificationService) └─────┘