Skip to Content
avatar image
Former Member

Can't find LoginModule

Hi all,

I can't seem to use the BasicPasswordLoginModule that is preconfigured in the J2EE engine. Here is what I have done:

1. Succesfully deployed the app that wants to use the login module.

2. Used the Visual Admin's Security Provider to associate the existing BasicPasswordLoginModule to both the Web and EJB components.

3. Try to programatically create a LoginContext from within the container (in a servlet, for instance). I am using the following code :

LoginContext = new


At this point I get the following error : No LoginModules configured for BasicPasswordLoginModule



at ......

What am I missing?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 19, 2006 at 11:52 AM


    i am also facing same problem. I searched a lot on SAP forums but all this type of questions are still unanswered.

    I hav implemented standard java LoginModule class.

    Then created its library and deploy it according steps given in SAP Help.

    Then referered it in my Applcation's servlet page as

    LoginContext loginContext = new LoginContext("MyLoginModule", callbackHandler);

    But still it is giving <b>loginException</b>: No LoginModules configured for MyLoginModule

    Can anyone help me. Its very very urgent for me.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      It seems that you should use policy configuration instead of login module name in your code.

      Step by step:

      1. You have to create new policy configuration using:

      Visual Administrator - Server - Services - Security Provider - choose Add button in the "Components" frame - Enter the name of new policy configuration e.g."test" - choose Add new button in the Authentication frame - choose your Login module (I supposed you have registered your login module on J2EE correctly)

      2. Use policy configuration name "test" in your code:

      LoginContext loginContext = new LoginContext("test", callbackHandler);

      I hope it helps