6 Replies Latest reply on Dec 2, 2004 9:16 AM by darknight

    AbstractServerLoginModule not found

    darknight

      When running my application (swing) I get this error:

      java.lang.NoClassDefFoundError: org/jboss/security/auth/spi/AbstractServerLoginModule

      This happens when I try to login. I am using a custom login module that extends the AbstractSLM, maybe I did some mistake configuring the application? It works if I include the jars in /server/myconfig but it doesn't if I only include those in /client and /lib

        • 1. Re: AbstractServerLoginModule not found
          darknight

           

          "Darknight" wrote:
          It works if I include the jars in /server/myconfig but it doesn't if I only include those in /client and /lib


          I ment "put in classpath" not "include", that way it looks like a compiler problem.

          • 2. Re: AbstractServerLoginModule not found
            starksm64

            The AbstractServerLoginModule is not a client side class and does not exist in any /client or /lib jar. It only exists in the server/xxx/lib/jbosssx.jar.

            • 3. Re: AbstractServerLoginModule not found
              darknight

              This is indeed what I was thingking but then I don't quite understand why the client needs it to work. Probably a mistake on my part but I don't know where. I simply inherited from that class following other JAAS examples to create my custom login module, nothing more.

              I'll look in my code.

              • 4. Re: AbstractServerLoginModule not found
                darknight

                ProxyLoginModule was the answer, I found it re-reading the admin-develop docs. Cheers

                • 5. Re: AbstractServerLoginModule not found
                  darknight

                  Unfortunately that didn't solve the problem. I thought everything was fine when I discovered about the ProxyLoginModule but in fact the classloader is still looking for server side classes the client should not have access to nor care about...
                  If I include jboss_dist/server/all/lib/jbosssx.jar in the client classpath everything works, otherwise I get the usual error.

                  My auth.conf (server side):

                  test-realm

                  {

                  org.jboss.security.auth.spi.ProxyLoginModule required

                  moduleName=bda.beans.jaas.EJBLoginModule;

                  };

                  ---

                  The loginmodule declaration:

                  public class EJBLoginModule extends AbstractServerLoginModule

                  ---

                  The output (client side):

                  java.lang.NoClassDefFoundError: org/jboss/security/auth/spi/AbstractServerLoginModule
                  at java.lang.ClassLoader.defineClass0(Native Method)
                  at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
                  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
                  at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
                  at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
                  at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
                  at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
                  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
                  at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
                  at java.lang.Class.forName0(Native Method)
                  at java.lang.Class.forName(Class.java:219)
                  at javax.security.auth.login.LoginContext.invoke(LoginContext.java:637)
                  at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
                  at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
                  at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
                  at bda.NewClient.login(NewClient.java:634)

                  No output at all from server side.
                  I'm still working on this but until now I don't have a clue.

                  • 6. Re: AbstractServerLoginModule not found
                    darknight

                    I finally got it right. I was doing "almost" everything right