java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

QOS.ch JIRA | jake pezaro | 8 years ago
  1. 0

    Eclipse RCP classes using slf4j throw the following exception when being unit tested. The same classes work correctly when running inside a RCP application. java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60) at test.MyClass.<init>(MyClass.java:8) at test.MyTest.testGetString(MyTest.java:8) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 21 more To replicate this problem: 1. import the attached test project into eclipse 2. run test/MyTest as a junit test

    QOS.ch JIRA | 8 years ago | jake pezaro
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
  2. 0

    Eclipse RCP classes using slf4j throw the following exception when being unit tested. The same classes work correctly when running inside a RCP application. java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60) at test.MyClass.<init>(MyClass.java:8) at test.MyTest.testGetString(MyTest.java:8) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 21 more To replicate this problem: 1. import the attached test project into eclipse 2. run test/MyTest as a junit test

    QOS.ch JIRA | 8 years ago | jake pezaro
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
  3. 0

    Hibernate Community • View topic - Hibernate Annotations Error

    hibernate.org | 1 year ago
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate Community • View topic - Hibernate Annotations Error

    hibernate.org | 7 months ago
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
  6. 0

    Error creating bean seek answers - CodeWeblog.com

    codeweblog.com | 1 year ago
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

    12 unregistered visitors
    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.impl.StaticLoggerBinder

      at java.net.URLClassLoader$1.run()
    2. Java RT
      ClassLoader.loadClassInternal
      1. java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      2. java.security.AccessController.doPrivileged(Native Method)
      3. java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      4. java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      5. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
      6. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      7. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      7 frames
    3. SLF4J API Module
      LoggerFactory.<clinit>
      1. org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
      1 frame
    4. test
      MyTest.testGetString
      1. test.MyClass.<init>(MyClass.java:8)
      2. test.MyTest.testGetString(MyTest.java:8)
      2 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    6. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runTest(TestCase.java:164)
      2. junit.framework.TestCase.runBare(TestCase.java:130)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:120)
      7. junit.framework.TestSuite.runTest(TestSuite.java:230)
      8. junit.framework.TestSuite.run(TestSuite.java:225)
      8 frames
    7. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      2. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      6. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      6 frames