question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Circular bean dependency since 4.5.8

See original GitHub issue

It works with 4.5.7 We have turned on Circular Dependency Check on the Spring Application Context. Its disabled by default, because Spring is trying to handle those circles in some cases.

Error message on startup:

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

   grpcServerRunner (field private org.lognet.springboot.grpc.GRpcServicesRegistry org.lognet.springboot.grpc.GRpcServerRunner.registry)
┌─────┐
|  grpcServicesRegistry defined in class path resource [org/lognet/springboot/grpc/autoconfigure/GRpcAutoConfiguration.class]
↑     ↓
|  exceptionHandlerInterceptor defined in class path resource [org/lognet/springboot/grpc/autoconfigure/GRpcAutoConfiguration.class]
↑     ↓
|  failureHandlingSupport defined in class path resource [org/lognet/springboot/grpc/autoconfigure/GRpcAutoConfiguration.class]
↑     ↓
|  exceptionHandlerMethodResolver defined in class path resource [org/lognet/springboot/grpc/autoconfigure/GRpcAutoConfiguration.class]
└─────┘

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jvmletcommented, Oct 25, 2021

Thanks @gbrehmer , reproduced, will be fixed

0reactions
gbrehmercommented, Oct 25, 2021

Are you using @EnableGrpcSecurity annotation ? If yes - remove it, the security can be controlled with grpc.security.auth.enabled property. If this doesn’t help please post your configuration

we do not use both, only @GRpcService

Read more comments on GitHub >

github_iconTop Results From Across the Web

Circular Dependencies in Spring - Baeldung
But with a circular dependency, Spring cannot decide which of the beans should be created first since they depend on one another.
Read more >
Handle Circular Dependencies in Spring - Java Guides
In this short article, we will discuss how to handle circular dependencies in spring based applications. If you use predominantly constructor injection, ...
Read more >
Spring Framework Reference Documentation
If no circular dependencies exist, when one or more collaborating beans are being injected into a dependent bean, each collaborating bean is totally...
Read more >
Error creating bean with name 'commandGateway' defined in ...
Circular references between beans are now prohibited by default. If your application fails to start due to a BeanCurrentlyInCreationException ...
Read more >
Break circular references which disabled by default since ...
Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found