• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Spring Boot - Clicking on Debug on Intellij gives NoSuchMethodError

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am working on Spring Boot and getting NoSuchMethodError when I click on Debug.
Apparently it is caused by multiple slf4j bindings in the classpath.
It all happened all of a sudden and I am not able to fix this for over a week now.

Please see the attached stacktrace.

My maven dependency tree is pasted below showing the different loggers on the list.

[INFO] +- org.thymeleaf.extras:thymeleaf-extras-springsecurity5:jar:3.0.4.RELEASE:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.4.2:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.4.2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.4.2:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] |  |  |  | \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] |  |  | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile


What is the reason for this error ?


stacktrace.png
stack trace
stack trace
 
Bartender
Posts: 2085
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you find this stackoverflow helpful?
https://stackoverflow.com/questions/17755893/nosuchmethoderror-org-slf4j-impl-staticloggerbinder-getsingleton

It says there may be a library which is using Slf4j which is  an old version and try to exclude it.
 
Rt Shenoy
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This issue is now solved.


The problem was that there was a breakpoint somewhere and I just had to delete all the breakpoints.


I removed all breakpoints and now everything is fine.


To remove all breakpoints in IntelliJ Idea press following sequence of shortcuts: Ctrl + Shift + F8 (open Breakpoints dialog) Ctrl + A (select all breakpoint) Alt + Delete (remove selected breakpoints) Enter (confirm)
 
Your mother is a hamster and your father smells of tiny ads!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic