Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies cycle between actuator and spring-data-jpa #13406

Closed
chinfeng opened this issue Jun 7, 2018 · 11 comments
Closed

Dependencies cycle between actuator and spring-data-jpa #13406

chinfeng opened this issue Jun 7, 2018 · 11 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@chinfeng
Copy link

chinfeng commented Jun 7, 2018

It just appear when i use spring-boot-starter-actuator and spring-boot-starter-data-jpa together.

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

Description:

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

   servletEndpointRegistrar defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration.class]
      ↓
   healthEndpoint defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]
      ↓
   org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration
┌─────┐
|  dataSource
↑     ↓
|  scopedTarget.dataSource defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]
↑     ↓
|  org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker
└─────┘
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 7, 2018
@philwebb
Copy link
Member

philwebb commented Jun 7, 2018

@chinfeng I'm not seeing the same error when I add actuator to our JPA sample. Can you please share a zip file or github repo with a project that shows the problem?

@philwebb philwebb added the status: waiting-for-feedback We need additional information before we can continue label Jun 7, 2018
@wilkinsona
Copy link
Member

I think this is a duplicate of #13042. It’s triggered by Spring Cloud where a workaround has also now been implemented.

@chinfeng
Copy link
Author

chinfeng commented Jun 7, 2018

Thanks @wilkinsona . The problem gone when I remove @EnableDiscoveryClient from application class.

@chinfeng chinfeng closed this as completed Jun 7, 2018
@snicoll snicoll added for: external-project For an external project and not something we can fix and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Jun 7, 2018
@wenfei3
Copy link

wenfei3 commented Oct 12, 2018

hi ,I met the same problem.

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
</parent>

If I modify the spring boot version 2.0.1 to 2.0.2, it will be gone.

@samo-esure
Copy link

I'm able to work around this issue by specifying management.server.port different than the server.port

@sunqb

This comment has been minimized.

@flowmaster
Copy link

That's rt @wenfei3 , post update to 2.0.2.RELEASE version of spring boot parent , it works fine .

@JerrinThomas
Copy link

hi ,I met the same problem.

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
</parent>

If I modify the spring boot version 2.0.1 to 2.0.2, it will be gone.

This one worked :)

@yangmingsen
Copy link

yangmingsen commented Jun 10, 2020

That's rt @wenfei3 , post update to 2.0.2.RELEASE version of spring boot parent , it works fine .

This is a good suggestion. Thank you.

@osys
Copy link

osys commented Sep 9, 2020

hi ,I met the same problem.

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
</parent>

If I modify the spring boot version 2.0.1 to 2.0.2, it will be gone.

I have changed the Spring boot version to 2.0.2, but this situation still occurs. I don't know what the situation is.

@wilkinsona
Copy link
Member

@LeeYiua This issue was originally tracking a problem that was then fixed in Spring Cloud. I suspect that those whose problem was solved by upgrading to Spring Boot 2.0.2 from 2.0.1 had a different problem as no change was made in Spring Boot as a result of this issue. Also, please not that Spring Boot 2.0.x is no longer supported. I would recommend upgrading to Spring Boot 2.3.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests