Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.NoSuchMethodError: ch.qos.logback.classic.LoggerContext.getBithTime()

Tags:

slf4j

logback

Why do I get this error:

java.lang.NoSuchMethodError: ch.qos.logback.classic.LoggerContext.getBithTime()

My guess is that the typo has been fixed and the versions of slf4j and logback don't match but I couldn't find anything in the release notes which says which versions are compatible.

Currently, I'm using org.slf4j.api 1.6.1 and ch.qos.logback.classic 0.9.27.

They are from Eclipse Orbit so it's not really simple to change either version.

like image 561
Aaron Digulla Avatar asked Mar 15 '12 10:03

Aaron Digulla


1 Answers

Quoting Logback news:

January 25th, 2011 - Release of version 0.9.28

Breaking change: In the Context interface, the previously misspelled property bithTime is now renamed as birthTime.

In the Context interface, the previously misspelled property bithTime is now renamed as birthTime. This is a backward-incompatible change. All pre-existing references to "bithTime" property now need to referenced as "birthTime".

Actually the 0.9.27 declares SLF4J 1.6.1 as a dependency, are you sure all your JARs have the version specified? This method is used internally between Logback modules and I guess it was renamed in all of them which suggests you have a different version of logback-core and logback-classic JARs.

Also really consider upgrading, this version is more than a year old and Logback is now in 1.x.

like image 75
Tomasz Nurkiewicz Avatar answered Jan 04 '23 15:01

Tomasz Nurkiewicz