2 Replies Latest reply on Nov 22, 2012 11:31 AM by Sven Schoeni

    Custom Login Modue java.lang.NoClassDefFoundError: javax/security/auth/login/LoginException

    Sven Schoeni Newbie

      Hey Community  at the time i'm developing a custom loginmodule. but when i try to call it the following exception occurs:

       

      16:16:37,612 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http--0.0.0.0-9090-4) An exception or error occurred in the container during the request processing: java.lang.NoClassDefFoundError: javax/security/auth/login/LoginException
                at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_25]
                at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_25]
                at javax.security.auth.login.LoginContext.invoke(LoginContext.java:731) [rt.jar:1.6.0_25]
                at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) [rt.jar:1.6.0_25]
                at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) [rt.jar:1.6.0_25]
                at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.6.0_25]
                at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [rt.jar:1.6.0_25]
                at javax.security.auth.login.LoginContext.login(LoginContext.java:579) [rt.jar:1.6.0_25]
                at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
                at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
                at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:361) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
                at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
                at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:214) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
                at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.13.Final.jar:]
                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]
      Caused by: java.lang.ClassNotFoundException: javax.security.auth.login.LoginException from [Module "ch.nevis:main" from local module loader @46b8c8e6 (roots: C:\ieu\AppServer\liferay-portal-6.1.20-nevis\jboss-7.1.1\modules)]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
                ... 25 more
      

      my module.xml looks like:

      <?xml version="1.0"?>
      <module xmlns="urn:jboss:module:1.1" name="ch.nevis">
                <resources>
                          <resource-root path="jcan-commons.jar" />
                          <resource-root path="jcan-saml.jar" />
                          <resource-root path="jcan-saml-tools.jar" />
                          <resource-root path="jcan-saml-xmlbeans.jar" />
                          <resource-root path="jcan-sectoken.jar" />
                          <resource-root path="bcprov-jdk15-138.jar" />
                          <resource-root path="jsr173_1.0_api.jar" />
                          <resource-root path="ninja-commons.jar" />
                          <resource-root path="ninja-jboss.jar" />
                </resources>
      
                <dependencies>
                          <module name="org.apache.santuario.xmlsec"/>
                          <module name="org.apache.xalan"/>
                          <module name="org.picketbox" export="true"/>
          </dependencies>
      </module>
      

      and the login section in standalone.xml

       

        <login-module code="ch.jboss.auth.JbossLoginModuleImpl" flag="required" module="ch.nevis">
            ....
                              </login-module>
      

      :

      Does anyone have an idea where to find this LoginException in the modules of jboss. Cause i thin thats the problem

      Thanks

      Sven