You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem became visible while working on #691.
Details
On Spring Boot Application Start of sechub-server (it does not happen at PDSstart) we have following output inside console:
2022-02-09 10:36:33.445 ERROR 27969 --- [ 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:
domainMessageService defined in file [/home/albert/develop/projects/sechub/sechub-review-open-source/sechub-shared-kernel/bin/main/com/daimler/sechub/sharedkernel/messaging/DomainMessageService.class]
↓
scanMessageHandler (field com.daimler.sechub.domain.scan.project.ScanProjectConfigAccessLevelService com.daimler.sechub.domain.scan.ScanMessageHandler.projectAccessLevelService)
┌─────┐
| scanProjectConfigAccessLevelService (field com.daimler.sechub.domain.scan.project.ScanProjectConfigService com.daimler.sechub.domain.scan.project.ScanProjectConfigAccessLevelService.scanProjectConfigService)
↑ ↓
| scanProjectConfigService (field com.daimler.sechub.domain.scan.ScanAssertService com.daimler.sechub.domain.scan.project.ScanProjectConfigService.scanAssertService)
↑ ↓
| scanAssertService (field com.daimler.sechub.domain.scan.project.ScanProjectConfigAccessLevelService com.daimler.sechub.domain.scan.ScanAssertService.accessLevelService)
└─────┘
Action:
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
Solution
Fix the circular references issue and remove the allow-circular-references: true in sechub-server/src/main/resources/application.yml.
The text was updated successfully, but these errors were encountered:
Jeeppler
changed the title
Fix the circular reference issues allow-circular-references: true
SpringBoot 2.6: Fix the circular reference issues allow-circular-references: true
Jan 14, 2022
the problem has to do with some tests. This is a problem which should be looked at by @de-jcup as it requires an in-depth knowledge of both SecHub and the SpringFramework.
- some assert services where used by caller side but reuse them as well
- so it was not clear for the framework which one would be
initialized first.
- To avoid this, the assert services get the callers injected lazy, so
only necessary at runtime when instances are already created
Problem
SpringBoot 2.6 prohibits circular references between beans by default: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6-Release-Notes#circular-references-prohibited-by-default. The workaround is to set
allow-circular-references: true
in thesechub-server/src/main/resources/application.yml
. The workaround works, but is far from ideal.This problem became visible while working on #691.
Details
On Spring Boot Application Start of
sechub-server
(it does not happen atPDS
start) we have following output inside console:Solution
Fix the circular references issue and remove the
allow-circular-references: true
insechub-server/src/main/resources/application.yml
.The text was updated successfully, but these errors were encountered: