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.

Admin Client NoSuchMethod Exception in Tomcat

See original GitHub issue

After upgrade to 2.4.1 I receive this Exception now in tomcat 9 and it keeps on coming in the logs periodically:

2021-05-04 05:35:01,412 [registrationTask1] o.s.s.s.TaskUtils$LoggingErrorHandler ERROR - Unexpected error occurred in scheduled task(95)
java.lang.NoSuchMethodError: org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties.getBasePath()Ljava/lang/String;
	at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getManagementContextPath(ServletApplicationFactory.java:86)
	at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getManagementBaseUrl(ServletApplicationFactory.java:77)
	at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getHealthUrl(DefaultApplicationFactory.java:154)
	at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.createApplication(DefaultApplicationFactory.java:80)
	at de.codecentric.boot.admin.client.registration.DefaultApplicationRegistrator.register(DefaultApplicationRegistrator.java:56)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

My config has not changed:

spring.boot.admin.client.url                                 = http://localhost:8080/adminServer
spring.boot.admin.client.username                            = username
spring.boot.admin.client.password                            = password
spring.boot.admin.client.instance.service-base-url           = http://localhost:8080

Several applications using 2.4.1 but runs on Spring Boot 2.2.0 and some on >2.3.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
erikpetzoldcommented, May 21, 2021

Hi @hakuseki

the Spring Boot Admin Client 2.4 is calling ManagementServerProperties.getBasePath() which has been introduced in Spring Boot 2.4 (in older versions it was getServlet().getContextPath() which is deprecated now and will be removed in the next release)

So if your application is using Spring Boot 2.3, you also have to use SBA Client 2.3.

0reactions
hakusekicommented, May 12, 2021

and I can confirm that by reverting to 2.3.1 it’s working fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Admin Client NoSuchMethod Exception in Tomcat
After upgrade to 2.4.1 I receive this Exception now in tomcat 9 and it keeps on coming in the logs periodically:
Read more >
java.lang.NoSuchMethodError exception for having correct ...
I am writing a Java web app and put in Tomcat to run. ... While spymemcached-2.8.2.jar contains the method, so I do not...
Read more >
59209 – java.lang.NoSuchMethodException: javax.net.ssl ...
Hi, I think specifying cipher suites is another solution, but may be more complicate, because: 1) we don't know what http version client...
Read more >
PM96694: JAVA.LANG.NOSUCHMETHODEXCEPTION ... - IBM
An attempt to list messages on a queue point that belongs to a WebSphere Application Server v7 messaging engine, using.
Read more >
java.lang.NoSuchMethodException While Starting OIM 12.2.1.3
See logs for more details" when we try to login to identity console after a admin and/or managed server restart in prod only....
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