Spring-boot-admin: java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.getServletPrefix()Ljava/lang/String; in Spring Boot 2.1.0.M4 Version

Created on 1 Oct 2018  路  5Comments  路  Source: codecentric/spring-boot-admin

During my test with Spring Boot in version 2.1.0.M4 and the Spring Boot Admin in Version 2.0.3 together with openJDK 11 i have had get the following Exception. My Application starts with an embedded tomcat server.

ERROR 14460 --- [gistrationTask1] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task.

java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.getServletPrefix()Ljava/lang/String;
    at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getDispatcherServletPrefix(ServletApplicationFactory.java:98)
    at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getManagementBaseUrl(ServletApplicationFactory.java:75)
    at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getHealthUrl(DefaultApplicationFactory.java:150)
    at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.createApplication(DefaultApplicationFactory.java:71)
    at de.codecentric.boot.admin.client.registration.ApplicationRegistrator.createApplication(ApplicationRegistrator.java:154)
    at de.codecentric.boot.admin.client.registration.ApplicationRegistrator.register(ApplicationRegistrator.java:71)
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

I have also tried to set the URLs with the following configuration parameters. But this doesn't solved the problem.

  • spring.boot.admin.client.instance.health-url
  • spring.boot.admin.client.instance.management-base-url
  • spring.boot.admin.client.instance.management-url

My Question ist now wether this is a problem with openjdk11? Give it a workaround?

Most helpful comment

Spring Boot 2.1.0 Release version is available now and I am getting the same error when i tried to connect to Spring Boot Admin Starter Client 2.0.4 version. As my application is going to be deployed in production soon, we don't want to use Spring Boot Admin Start client 2.1.0-SNAPSHOT version. When will the release version be available.

All 5 comments

For spring boot 2.1.x you need to use one of our 2.1.0-SNAPSHOT versions

Thank you for the fast response. I have tried it with with the 2.1.0-Snapshot version and it works fine. Do you have a point of time for a release of this Version?

Spring Boot 2.1.0 Release version is available now and I am getting the same error when i tried to connect to Spring Boot Admin Starter Client 2.0.4 version. As my application is going to be deployed in production soon, we don't want to use Spring Boot Admin Start client 2.1.0-SNAPSHOT version. When will the release version be available.

Thanks for the response.

Was this page helpful?
0 / 5 - 0 ratings