Getting java.lang.ClassNotFoundException: org.apache.karaf.jaas.config.JaasRealm not found by RD.service [455]

classic Classic list List threaded Threaded
1 message Options
RD
Reply | Threaded
Open this post in threaded view
|

Getting java.lang.ClassNotFoundException: org.apache.karaf.jaas.config.JaasRealm not found by RD.service [455]

RD
I am using 2.4.0.redhat-621107 for org.apache.karaf.jaas.config. I checked
this jar and it have the JaasRealm class but still I am getting this error.
Kindly help me and let me know what I am doing wrong or where I am going
wrong. I faced it while implementing LDAP in blueprint. Have a look at my
blueprint here.

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
  xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0"
  xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
  xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
        xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
       http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
       
       
        <bean id="standardPBEStringEncryptor"
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor" />
         
        <enc:property-placeholder>
            <enc:encryptor
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
              <property name="config">
                <bean
class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
                  <property name="algorithm" value="PBEWithMD5AndDES" />
                  <property name="password" value="FUSE_ENCRYPTION_PASSWORD" />
                </bean>
              </property>
            </enc:encryptor>
        </enc:property-placeholder>
       
        <jaas:config name="karaf">
            <jaas:module
className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule"
flags="required">
              initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
              debug=true
                connectionURL=${ldap.url}
               
connectionUsername=cn=mqbroker,ou=Services,ou=system,dc=jbossfuse,dc=com
                connectionPassword=${ldap.password}
                connectionProtocol=
                authentication=jayspt
                userRoleName=karaf
                userBase = ou=User,ou=ActiveMQ,ou=system,dc=jbossfuse,dc=com
                userSearchMatching=(uid={0})
                userSearchSubtree=true
                roleBase = admin
                roleName=cn
                roleSearchMatching= (member:=uid={1})
                roleSearchSubtree=true
            </jaas:module>
         </jaas:config>
</blueprint>

Please find the full error logs

java.lang.ClassNotFoundException: org.apache.karaf.jaas.config.JaasRealm not
found by RD.service [455]
  at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556)
  at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)
  at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_144]
  at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1853)
  at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:958)
  at
org.apache.aries.blueprint.container.BlueprintContainerImpl.loadClass(BlueprintContainerImpl.java:433)
  at
org.apache.aries.blueprint.container.ServiceRecipe.convertStringsToClasses(ServiceRecipe.java:432)
  at
org.apache.aries.blueprint.container.ServiceRecipe.getClassesForProxying(ServiceRecipe.java:422)
  at
org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:302)
  at
org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:252)
  at
org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:149)
  at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
  at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
  at
org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:247)
  at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
  at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:682)
  at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)
  at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
  at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)
  at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:263)
  at
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:253)
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[org.apache.aries:org.apache.aries.util:1.1.0]
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[org.apache.aries:org.apache.aries.util:1.1.0]
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[org.apache.aries:org.apache.aries.util:1.1.0]
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[org.apache.aries:org.apache.aries.util:1.1.0]
  at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
  at
org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1127)
  at
org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:696)
  at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:484)
  at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4429)
  at org.apache.felix.framework.Felix.startBundle(Felix.java:2100)
  at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976)
  at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963)
  at
org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:51)
  at
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
  at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
  at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_144]
  at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_144]
  at
org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)[org.apache.aries.proxy:org.apache.aries.proxy.impl:1.0.4]
  at
org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)[org.apache.aries.proxy:org.apache.aries.proxy.impl:1.0.4]
  at
org.apache.karaf.shell.console.commands.$BlueprintCommand1543119609.execute(Unknown
Source)[38:org.apache.karaf.shell.console:2.4.0.redhat-621107][org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.karaf.shell.console.jline.Console.run(Console.java:197)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]
  at
org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[org.apache.karaf.shell:org.apache.karaf.shell.console:2.4.0.redhat-621107]



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html