java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

nabble.com | 2 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    Shiro User - java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

    nabble.com | 2 months ago
    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
  2. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  3. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Check if you didn't forget to instantiate your topic in the kafka broker.
  6. 0
    samebug tip
    NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.
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.apache.commons.logging.LogFactory

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    2. java.security.AccessController.doPrivileged(Native Method)
    3. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    5. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    6. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    6 frames
  3. Apache Commons BeanUtils
    PropertyUtils.getPropertyDescriptor
    1. org.apache.commons.beanutils.ConvertUtilsBean.<init>(ConvertUtilsBean.java:130)
    2. org.apache.commons.beanutils.BeanUtilsBean.<init>(BeanUtilsBean.java:110)
    3. org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:68)
    4. org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:80)
    5. org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:78)
    6. org.apache.commons.beanutils.PropertyUtilsBean.getInstance(PropertyUtilsBean.java:101)
    7. org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:309)
    7 frames
  4. Shiro
    AbstractFactory.getInstance
    1. org.apache.shiro.config.ReflectionBuilder.isTypedProperty(ReflectionBuilder.java:241)
    2. org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:349)
    3. org.apache.shiro.config.ReflectionBuilder.applySingleProperty(ReflectionBuilder.java:200)
    4. org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:161)
    5. org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:121)
    6. org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:171)
    7. org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:120)
    8. org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:98)
    9. org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:84)
    10. org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:42)
    11. org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:124)
    12. org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:48)
    12 frames
  5. org.dropchop.jop
    SecurityGuardTest.testLoginLogout
    1. org.dropchop.jop.security.SecurityGuard.<init>(SecurityGuard.java:28)
    2. org.dropchop.jop.security.SecurityGuardTest.testLoginLogout(SecurityGuardTest.java:146)
    2 frames
  6. 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
  7. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    6. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    9. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    10. org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    11. org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    12. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    13. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    14. org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    14 frames
  8. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    1 frame
  9. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    5 frames