java.lang.ClassNotFoundException: LdapRealm

Sonatype JIRA | Joe Tom | 1 year 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

    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}

    Sonatype JIRA | 1 year ago | Joe Tom
    java.lang.ClassNotFoundException: LdapRealm
  2. 0

    Unable to lookup security realms > java.lang.ClassNotFoundException:

    GitHub | 6 months ago | webmutation
    java.lang.ClassNotFoundException: org.sonatype.nexus.plugins.crowd.security.CrowdAuthenticatingRealm
  3. 0

    GitHub comment 10#262675989

    GitHub | 6 months ago | rhoml
    java.lang.ClassNotFoundException: org.sonatype.nexus.crowd.plugin.CrowdAuthenticatingRealm
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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.
  6. 0
    samebug 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.
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

    LdapRealm

    at java.lang.ClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.lang.ClassLoader.findClass(ClassLoader.java:530)[na:1.8.0_40]
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_40]
    2 frames
  3. Google Guice - Core Library
    BytecodeGen$BridgeClassLoader.loadClass
    1. com.google.inject.internal.BytecodeGen$BridgeClassLoader.classicLoadClass(BytecodeGen.java:331)[na:na]
    2. com.google.inject.internal.BytecodeGen$BridgeClassLoader.loadClass(BytecodeGen.java:325)[na:na]
    2 frames
  4. Java RT
    ClassLoader.loadClass
    1. java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_40]
    1 frame
  5. org.sonatype.nexus
    RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0$$FastClassByGuice$$6b159d10.invoke
    1. org.sonatype.nexus.security.internal.RealmManagerImpl.resolveRealms(RealmManagerImpl.java:212)[org.sonatype.nexus.security:3.0.0.SNAPSHOT]
    2. org.sonatype.nexus.security.internal.RealmManagerImpl.installRealms(RealmManagerImpl.java:190)[org.sonatype.nexus.security:3.0.0.SNAPSHOT]
    3. org.sonatype.nexus.security.internal.RealmManagerImpl.doStart(RealmManagerImpl.java:93)[org.sonatype.nexus.security:3.0.0.SNAPSHOT]
    4. org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)[org.sonatype.nexus.common:3.0.0.SNAPSHOT]
    5. org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0.CGLIB$start$11(<generated>)[!/:na]
    6. org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0$$FastClassByGuice$$6b159d10.invoke(<generated>)[!/:na]
    6 frames
  6. Google Guice - Core Library
    InterceptorStackCallback$InterceptedMethodInvocation.proceed
    1. com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)[com.google.inject:4.0.0]
    2. com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)[com.google.inject:4.0.0]
    2 frames
  7. org.sonatype.nexus
    TransitionsInterceptor.invoke
    1. org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)[org.sonatype.nexus.common:3.0.0.SNAPSHOT]
    2. org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)[org.sonatype.nexus.common:3.0.0.SNAPSHOT]
    3. org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)[org.sonatype.nexus.common:3.0.0.SNAPSHOT]
    3 frames
  8. Google Guice - Core Library
    InterceptorStackCallback.intercept
    1. com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)[com.google.inject:4.0.0]
    2. com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)[com.google.inject:4.0.0]
    2 frames
  9. org.sonatype.nexus
    DefaultSecuritySystem.doStart
    1. org.sonatype.nexus.security.internal.RealmManagerImpl$$EnhancerByGuice$$b5f6f1e0.start(<generated>)[!/:na]
    2. org.sonatype.nexus.security.internal.DefaultSecuritySystem.doStart(DefaultSecuritySystem.java:115)[org.sonatype.nexus.security:3.0.0.SNAPSHOT]
    2 frames
  10. org.sonatype.goodies
    LifecycleSupport.start
    1. org.sonatype.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:104)[org.sonatype.goodies.lifecycle:2.1.0.SNAPSHOT]
    1 frame
  11. org.sonatype.nexus
    ListenerTracker.addingService
    1. org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:154)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT]
    2. org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:94)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT]
    3. org.sonatype.nexus.extender.NexusContextListener.contextInitialized(NexusContextListener.java:152)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT]
    4. org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:47)[org.sonatype.nexus.bootstrap:3.0.0.SNAPSHOT]
    5. org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:1)[org.sonatype.nexus.bootstrap:3.0.0.SNAPSHOT]
    5 frames
  12. OSGi
    ServiceTracker$Tracked.serviceChanged
    1. org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:na]
    2. org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:na]
    3. org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:na]
    4. org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:na]
    5. org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)[org.osgi.core-6.0.0.jar:na]
    5 frames
  13. Apache Felix Framework
    BundleContextImpl.registerService
    1. org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)[org.apache.felix.framework-5.4.0.jar:na]
    2. org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)[org.apache.felix.framework-5.4.0.jar:na]
    3. org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)[org.apache.felix.framework-5.4.0.jar:na]
    4. org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)[org.apache.felix.framework-5.4.0.jar:na]
    5. org.apache.felix.framework.Felix.registerService(Felix.java:3549)[org.apache.felix.framework-5.4.0.jar:na]
    6. org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)[org.apache.felix.framework-5.4.0.jar:na]
    6 frames
  14. org.sonatype.nexus
    NexusBundleExtender.start
    1. org.sonatype.nexus.extender.NexusBundleExtender.start(NexusBundleExtender.java:54)[org.sonatype.nexus.extender:3.0.0.SNAPSHOT]
    1 frame
  15. Apache Felix Framework
    FrameworkStartLevelImpl.run
    1. org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)[org.apache.felix.framework-5.4.0.jar:na]
    2. org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)[org.apache.felix.framework-5.4.0.jar:na]
    3. org.apache.felix.framework.Felix.startBundle(Felix.java:2144)[org.apache.felix.framework-5.4.0.jar:na]
    4. org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.4.0.jar:na]
    5. org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.4.0.jar:na]
    5 frames
  16. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]
    1 frame