java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler

Spring JIRA | Thomas Darimont | 3 years ago
  1. 0

    During a build of Spring Data MongoDB via mvn clean install One can observe the following exception during test runs due to missing a missing depenency to the SLF4J JUL Bridge. {code} Can't load log handler "org.slf4j.bridge.SLF4JBridgeHandler" java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.util.logging.LogManager$4.run(LogManager.java:802) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:796) at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1368) at java.util.logging.LogManager.access$1500(LogManager.java:148) at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1451) at java.util.logging.Logger.log(Logger.java:609) at java.util.logging.Logger.doLog(Logger.java:631) at java.util.logging.Logger.log(Logger.java:720) at com.mongodb.DBTCPConnector.initDirectConnection(DBTCPConnector.java:558) at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:526) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:236) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DB.getCollectionNames(DB.java:400) at org.springframework.data.mongodb.core.MongoTemplate$13.doInDB(MongoTemplate.java:1416) at org.springframework.data.mongodb.core.MongoTemplate$13.doInDB(MongoTemplate.java:1414) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:391) at org.springframework.data.mongodb.core.MongoTemplate.getCollectionNames(MongoTemplate.java:1414) at org.springframework.data.mongodb.config.MongoDbFactoryNoDatabaseRunningTests.failsDataAccessWithoutADatabaseRunning(MongoDbFactoryNoDatabaseRunningTests.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:19) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec {code} This can be avoided by adding the following test - dependency to the pom.xml {code:xml} <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <version>1.7.5</version> <scope>test</scope> </dependency> {code}

    Spring JIRA | 3 years ago | Thomas Darimont
    java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler
  2. 0

    During a build of Spring Data MongoDB via mvn clean install One can observe the following exception during test runs due to missing a missing depenency to the SLF4J JUL Bridge. {code} Can't load log handler "org.slf4j.bridge.SLF4JBridgeHandler" java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.util.logging.LogManager$4.run(LogManager.java:802) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:796) at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1368) at java.util.logging.LogManager.access$1500(LogManager.java:148) at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1451) at java.util.logging.Logger.log(Logger.java:609) at java.util.logging.Logger.doLog(Logger.java:631) at java.util.logging.Logger.log(Logger.java:720) at com.mongodb.DBTCPConnector.initDirectConnection(DBTCPConnector.java:558) at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:526) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:236) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DB.getCollectionNames(DB.java:400) at org.springframework.data.mongodb.core.MongoTemplate$13.doInDB(MongoTemplate.java:1416) at org.springframework.data.mongodb.core.MongoTemplate$13.doInDB(MongoTemplate.java:1414) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:391) at org.springframework.data.mongodb.core.MongoTemplate.getCollectionNames(MongoTemplate.java:1414) at org.springframework.data.mongodb.config.MongoDbFactoryNoDatabaseRunningTests.failsDataAccessWithoutADatabaseRunning(MongoDbFactoryNoDatabaseRunningTests.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:19) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec {code} This can be avoided by adding the following test - dependency to the pom.xml {code:xml} <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <version>1.7.5</version> <scope>test</scope> </dependency> {code}

    Spring JIRA | 3 years ago | Thomas Darimont
    java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler
  3. 0

    yacy.net | 11 months ago
    java.lang.ClassNotFoundException: net.yacy.kelondro.logging.LogalizerHandler
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Changing LogManager configuration in WebStart

    Oracle Community | 1 decade ago | 843802
    java.lang.ClassNotFoundException: com.support.packages.logger.java.ExceptionHandler
  6. 0

    Enabling Relationship Discovery

    Oracle Community | 4 years ago | Hemant Maddala
    java.lang.ClassNotFoundException: com.endeca.soleng.eac.toolkit.logging.RelativePathFileHandler

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassNotFoundException

      org.slf4j.bridge.SLF4JBridgeHandler

      at java.net.URLClassLoader$1.run()
    2. Java RT
      Logger.log
      1. java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      2. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      3. java.security.AccessController.doPrivileged(Native Method)
      4. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      5. java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      6. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      7. java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      8. java.util.logging.LogManager$4.run(LogManager.java:802)
      9. java.security.AccessController.doPrivileged(Native Method)
      10. java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:796)
      11. java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1368)
      12. java.util.logging.LogManager.access$1500(LogManager.java:148)
      13. java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1451)
      14. java.util.logging.Logger.log(Logger.java:609)
      15. java.util.logging.Logger.doLog(Logger.java:631)
      16. java.util.logging.Logger.log(Logger.java:720)
      16 frames
    3. MongoDB Java Driver
      DB.getCollectionNames
      1. com.mongodb.DBTCPConnector.initDirectConnection(DBTCPConnector.java:558)
      2. com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:526)
      3. com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:236)
      4. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)
      5. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)
      6. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
      7. com.mongodb.DB.getCollectionNames(DB.java:400)
      7 frames
    4. Spring Data MongoDB - Core
      MongoDbFactoryNoDatabaseRunningTests.failsDataAccessWithoutADatabaseRunning
      1. org.springframework.data.mongodb.core.MongoTemplate$13.doInDB(MongoTemplate.java:1416)
      2. org.springframework.data.mongodb.core.MongoTemplate$13.doInDB(MongoTemplate.java:1414)
      3. org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:391)
      4. org.springframework.data.mongodb.core.MongoTemplate.getCollectionNames(MongoTemplate.java:1414)
      5. org.springframework.data.mongodb.config.MongoDbFactoryNoDatabaseRunningTests.failsDataAccessWithoutADatabaseRunning(MongoDbFactoryNoDatabaseRunningTests.java:52)
      5 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    6. JUnit
      ExpectException.evaluate
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:19)
      5 frames
    7. Spring TestContext
      SpringJUnit4ClassRunner.runChild
      1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
      2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
      3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
      4. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
      5. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
      5 frames
    8. JUnit
      ParentRunner$2.evaluate
      1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      5 frames
    9. Spring TestContext
      RunAfterTestClassCallbacks.evaluate
      1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
      2 frames
    10. JUnit
      ParentRunner.run
      1. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      1 frame
    11. Spring TestContext
      SpringJUnit4ClassRunner.run
      1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
      1 frame
    12. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
      3 frames
    13. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    14. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      3. org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      4. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
      5 frames