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.

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

See original GitHub issue

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?

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
sreevidhyasethucommented, Oct 31, 2018

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.

0reactions
sreevidhyasethucommented, Nov 5, 2018

Thanks for the response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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