java.lang.ClassNotFoundException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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.

tip

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.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

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.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

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

  • I noticed the below error when I have the LDAP realm active. This occurs whether or not I have an LDAP configured (validly or invalidly). As far as I can tell there's no adverse behavior occurring with this enabled, which prompts me to file to make sure everything is OK and if so, have it tempered and if not have it investigated. NOTE: This error occurs before the Nexus has started seperation. I checked m7 and this is occurring there. It's also occurring with rut-auth realm despite the fact the rut-auth realm isn't enabled. I did not see that similar behavior with Homeslice, so it's possible this was partially fixed (or my applications are just at different configured states). I didn't check further back than that. I also didn't check NX2. {quote} 2016-03-21 16:07:48,344-0400 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.security.internal.RealmManagerImpl - Unable to lookup security realms java.lang.ClassNotFoundException: LdapRealm at java.lang.ClassLoader.findClass(ClassLoader.java:530) [na:1.8.0_40] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [na:1.8.0_40] at com.google.inject.internal.BytecodeGen$BridgeClassLoader.classicLoadClass(BytecodeGen.java:331) [na:na] at com.google.inject.internal.BytecodeGen$BridgeClassLoader.loadClass(BytecodeGen.java:325) [na:na] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [na:1.8.0_40] at org.sonatype.nexus.security.internal.RealmManagerImpl.resolveRealms(RealmManagerImpl.java:212) [org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.nexus.security.internal.RealmManagerImpl.installRealms(RealmManagerImpl.java:190) [org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.nexus.security.internal.RealmManagerImpl.doStart(RealmManagerImpl.java:93) [org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67) [org.sonatype.nexus.common:3.0.0.SNAPSHOT] at org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0.CGLIB$start$11(<generated>) [!/:na] at org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0$$FastClassByGuice$$6b159d10.invoke(<generated>) [!/:na] at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) [com.google.inject:4.0.0] at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75) [com.google.inject:4.0.0] at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [org.sonatype.nexus.common:3.0.0.SNAPSHOT] at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191) [org.sonatype.nexus.common:3.0.0.SNAPSHOT] at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56) [org.sonatype.nexus.common:3.0.0.SNAPSHOT] at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75) [com.google.inject:4.0.0] at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55) [com.google.inject:4.0.0] at org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0.start(<generated>) [!/:na] at org.sonatype.nexus.security.internal.DefaultSecuritySystem.doStart(DefaultSecuritySystem.java:115) [org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:104) [org.sonatype.goodies.lifecycle:2.1.0.SNAPSHOT] at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:154) [org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:94) [org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.sonatype.nexus.extender.NexusContextListener.contextInitialized(NexusContextListener.java:152) [org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:47) [org.sonatype.nexus.bootstrap:3.0.0.SNAPSHOT] at org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:1) [org.sonatype.nexus.bootstrap:3.0.0.SNAPSHOT] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) [org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) [org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [org.osgi.core-6.0.0.jar:na] at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.registerService(Felix.java:3549) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) [org.apache.felix.framework-5.4.0.jar:na] at org.sonatype.nexus.extender.NexusBundleExtender.start(NexusBundleExtender.java:54) [org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371) [org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) [org.apache.felix.framework-5.4.0.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] {quote}
    via by Joe Tom,
  • GitHub comment 10#262675989
    via GitHub by rhoml
    ,
  • GreenDao freemaker.jar is missing
    via Stack Overflow by thepoosh
    ,
  • Google App Engine with GWT Fails
    via Stack Overflow by Andy King
    ,
  • HttpClient on GAE
    via Stack Overflow by xybrek
    ,
    • java.lang.ClassNotFoundException: LdapRealm at java.lang.ClassLoader.findClass(ClassLoader.java:530)[na:1.8.0_40] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_40] at com.google.inject.internal.BytecodeGen$BridgeClassLoader.classicLoadClass(BytecodeGen.java:331)[na:na] at com.google.inject.internal.BytecodeGen$BridgeClassLoader.loadClass(BytecodeGen.java:325)[na:na] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_40] at org.sonatype.nexus.security.internal.RealmManagerImpl.resolveRealms(RealmManagerImpl.java:212)[org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.nexus.security.internal.RealmManagerImpl.installRealms(RealmManagerImpl.java:190)[org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.nexus.security.internal.RealmManagerImpl.doStart(RealmManagerImpl.java:93)[org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)[org.sonatype.nexus.common:3.0.0.SNAPSHOT] at org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0.CGLIB$start$11(<generated>)[!/:na] at org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0$$FastClassByGuice$$6b159d10.invoke(<generated>)[!/:na] at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)[com.google.inject:4.0.0] at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)[com.google.inject:4.0.0] at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)[org.sonatype.nexus.common:3.0.0.SNAPSHOT] at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)[org.sonatype.nexus.common:3.0.0.SNAPSHOT] at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)[org.sonatype.nexus.common:3.0.0.SNAPSHOT] at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)[com.google.inject:4.0.0] at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)[com.google.inject:4.0.0] at org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0.start(<generated>)[!/:na] at org.sonatype.nexus.security.internal.DefaultSecuritySystem.doStart(DefaultSecuritySystem.java:115)[org.sonatype.nexus.security:3.0.0.SNAPSHOT] at org.sonatype.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:104)[org.sonatype.goodies.lifecycle:2.1.0.SNAPSHOT] at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:154)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:94)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.sonatype.nexus.extender.NexusContextListener.contextInitialized(NexusContextListener.java:152)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:47)[org.sonatype.nexus.bootstrap:3.0.0.SNAPSHOT] at org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:1)[org.sonatype.nexus.bootstrap:3.0.0.SNAPSHOT] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:na] at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)[org.osgi.core-6.0.0.jar:na] at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.registerService(Felix.java:3549)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)[org.apache.felix.framework-5.4.0.jar:na] at org.sonatype.nexus.extender.NexusBundleExtender.start(NexusBundleExtender.java:54)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT] at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.4.0.jar:na] at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.4.0.jar:na] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]

    Users with the same issue

    Axelo
    22 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor3 times, last one,
    poroszd
    1 times, last one,
    1855 more bugmates