Hi,
I am using karaf 2.3.  I am trying to deploying web application on karaf
Jetty. It uses JAAS for authentication. I am facing class not found
exception.  Why is this class not available to my webapp ? Please help on
this.

Exception:
java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.apache.karaf.jaas.boot.principal.RolePrincipal not found by mytestapp
[106]
        at
org.eclipse.jetty.plus.jaas.JAASLoginService.getGroups(JAASLoginService.java:327)[71:org.eclipse.jetty.plus:7.6.7.v20120910]
        at
org.eclipse.jetty.plus.jaas.JAASLoginService.login(JAASLoginService.java:244)[71:org.eclipse.jetty.plus:7.6.7.v20120910]


I added below entry JAAS login service to jetty.xml

<Call name="addBean">
      <Arg>
        <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
                  <Set name="name">LDPA</Set>
          <Set name="loginModuleName">LDAP</Set>                  
                  <Set name="roleClassNames">
                        <Array type="java.lang.String">
                          
<Item>org.apache.karaf.jaas.boot.principal.RolePrincipal</Item>
                        </Array>
                  </Set>                  
        </New>
      </Arg>
    </Call>

Also added below entry to MANIFEST-INF file.
Import-Package:
javax.servlet,javax.servlet.annotation,javax.servlet.http,org.apache.commons.logging,org.apache.commons.logging.impl,org.apache.log4j,org.apache.log4j.spi,org.apache.log4j.xml,org.slf4j,org.slf4j.helpers,org.slf4j.spi,org.eclipse.jetty.*,org.eclipse.jetty.plus.jaas.*,
org.eclipse.jetty.security.*,org.eclipse.jetty.security.authentication.*,org.apache.karaf.jaas.boot.principal.*




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Class-not-found-exception-org-apache-karaf-jaas-boot-principal-RolePrincipal-tp4027557.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to