ava.lang.NoClassDefFoundError

org/apache/commons/logging/LogFactory

Samebug tips9

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.


rafaelrafael

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web17798

  • via Stack Overflow by Kliver Max
    ,
  • via Unknown by Unknown author,
  • Stack trace

    • ava.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.beanutils.ConvertUtilsBean.<init>(ConvertUtilsBean.java:130) at org.apache.commons.beanutils.BeanUtilsBean.<init>(BeanUtilsBean.java:110) at org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:68) at org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:80) at org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:78) at org.apache.commons.beanutils.PropertyUtilsBean.getInstance(PropertyUtilsBean.java:101) at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:309) at org.apache.shiro.config.ReflectionBuilder.isTypedProperty(ReflectionBuilder.java:241) at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:349) at org.apache.shiro.config.ReflectionBuilder.applySingleProperty(ReflectionBuilder.java:200) at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:161) at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:121) at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:171) at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:120) at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:98) at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:84) at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:42) at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:124) at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:48) at org.dropchop.jop.security.SecurityGuard.<init>(SecurityGuard.java:28) at org.dropchop.jop.security.SecurityGuardTest.testLoginLogout(SecurityGuardTest.java:146) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 45 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Andreas HäberAndreas Häber
    2 times, last one
    johnxflyjohnxfly
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    andyglickandyglick
    Once,
    somasundaramsomasundaram
    Once,
    2363 more bugmates