I'm struggling with Eclipse recognizing my logging configuration when I quickly run tests from Eclipse (Alt + Shift + X, T) or run from Run Configurations. I really donβt care that I canβt log in from the tests themselves, but I really just provide the configuration so that any log statements that are executed are not interrupted.
Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported exception: java.lang.NoSuchMethodError: ch.qos.logback.core.util.Loader.getResourceOccurrenceCount(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/util/Set; at ch.qos.logback.classic.util.ContextInitializer.multiplicityWarning(ContextInitializer.java:160) at ch.qos.logback.classic.util.ContextInitializer.statusOnResourceSearch(ContextInitializer.java:183) at ch.qos.logback.classic.util.ContextInitializer.getResource(ContextInitializer.java:141) at ch.qos.logback.classic.util.ContextInitializer.findURLOfDefaultConfigurationFile(ContextInitializer.java:130) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:144) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:123) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:337) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:287) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:309)
I have logback-test.xml in src / test / resources and configured this as the source folder with the output of the target / test classes.


I even tried to edit the Classpath for Run JUnit for my project and added the test classes folder there, and that didn't help.

Is there something simple I'm missing? I do not seem to remember that this problem was in the past with other projects.
source share