1 Reply Latest reply on Oct 1, 2007 4:35 AM by Thomas Fromm

    JBoss 4.0.5: [JAASRealm] No ClassLoaders found for: ...

    Thomas Fromm Newbie

      Hi,

      I've got a problem in configuring a JAAS LoginModule inside a .war.

      In Tomcat standalone I have configured the realm inside context.xml like this working example:

       <Realm
       className="org.apache.catalina.realm.JAASRealm"
       appName="PortalRealm"
       userClassNames="com.liferay.portal.security.jaas.PortalPrincipal"
       roleClassNames="com.liferay.portal.security.jaas.PortalRole"
       debug="99"
       useContextClassLoader="false"
       />
      

      A system property java.security.auth.login.config is used to direct to the jaas.config, which holds the configuration.
      PortalRealm {
       com.liferay.portal.kernel.security.jaas.PortalLoginModule required;
      };
      

      Inside JBoss I tried to configure the same stuff inside login-config.xml:
       <application-policy name = "PortalRealm">
       <authentication>
       <login-module code ="com.liferay.portal.security.jaas.PortalLoginModule"
       flag = "required">
       <module-option name="userClassNames">com.liferay.portal.security.jaas.PortalPrincipal</module-option>
       <module-option name="roleClassNames">com.liferay.portal.security.jaas.PortalRole</module-option>
      </login-module>
       </authentication>
       </application-policy>
      

      And the security domain is defined inside jboss-web.xml:
      <security-domain>java:/jaas/PortalRealm</security-domain>

      But I always get:
      12:41:45,233 WARN [JAASRealm] Login exception authenticating username "xxx"
      javax.security.auth.login.LoginException: No ClassLoaders found for: com.liferay.portal.security.jaas.PortalLoginModule
      ...

      Any ideas how to solve this problem?

      Thanks in advance,
      tf