0 Replies Latest reply on Apr 12, 2017 4:03 AM by Herman Shafiq

    How to configure Custom LoginModule of JAAS with Jboss fuse

    Herman Shafiq Newbie

      Im new in Jboss fuse and Jaas.

       

      Im try to configure my custom LoginModule of JAAS in jboss fuse blueprint but it always ends with the following excpetions

       

      Caused by: java.lang.ClassNotFoundException: org.apache.karaf.jaas.config.JaasRealm not found by log-query [335]

          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_121]

          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:439)

          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)

          ... 47 more

       

      Below is my blueprint

       

      <?xml version="1.0" encoding="UTF-8"?>

      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"

          xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"

          xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">

       

          <jaas:config name="JaasConfig" rank="2">

              <jaas:module className="pk.com.herman.jaas.JaasLoginModule"

                  flags="required">

              </jaas:module>

          </jaas:config>

      </blueprint>

       

      Im try to configure my custom LoginModule of JAAS in jboss fuse blueprint but it always ends with the following excpetions

      Caused by: java.lang.ClassNotFoundException: org.apache.karaf.jaas.config.JaasRealm not found by log-query [335]    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_121]    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:439)    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)    ... 47 more

      Below is my blueprint

      <?xml version="1.0" encoding="UTF-8"?><blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"    xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"    xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">     <jaas:config name="JaasConfig" rank="2">        <jaas:module className="pk.com.herman.jaas.JaasLoginModule"            flags="required">        </jaas:module>    </jaas:config></blueprint>