javax.naming.AuthenticationException: javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!

Oracle Community | 807578 | 8 years ago
  1. 0

    accessing vdi via Microsoft RDP

    Oracle Community | 8 years ago | 807578
    javax.naming.AuthenticationException: javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
  2. 0

    Active Directory Authentication problem

    Oracle Community | 6 years ago | 807578
    javax.naming.AuthenticationException: javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
  3. 0

    I tried to use JNDI security with OpenEJB - that is, constructing InitialContext with properties Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS set. It works beautifully, however when another InitialContext is constructed (first one is closed using Context.close()) the following exception occurs: Caused by: javax.naming.NamingException: Cannot instantiate an IntraVM InitialContext. Exception: javax.naming.AuthenticationException User could not be authenticated: karolko [Root exception is javax.naming.AuthenticationException: User could not be authenticated: karolko [Root exception is javax.security.auth.login.LoginException: Thread already associated with a client identity. Refusing to overwrite.]] at org.apache.openejb.client.LocalInitialContextFactory.getIntraVmContext(LocalInitialContextFactory.java:116) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:41) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at com.whitestein.fe.client.ejb.ClientCommunicationImpl.newClient(ClientCommunicationImpl.java:109) ... 16 more Caused by: javax.naming.AuthenticationException: User could not be authenticated: karolko [Root exception is javax.security.auth.login.LoginException: Thread already associated with a client identity. Refusing to overwrite.] at org.apache.openejb.core.ivm.naming.InitContextFactory.getInitialContext(InitContextFactory.java:53) at org.apache.openejb.client.LocalInitialContextFactory.getIntraVmContext(LocalInitialContextFactory.java:114) ... 22 more Caused by: javax.security.auth.login.LoginException: Thread already associated with a client identity. Refusing to overwrite. at org.apache.openejb.core.security.AbstractSecurityService.associate(AbstractSecurityService.java:174) at org.apache.openejb.core.security.AbstractSecurityService.associate(AbstractSecurityService.java:60) at org.apache.openejb.core.ivm.naming.InitContextFactory.getInitialContext(InitContextFactory.java:51) ... 23 more Probably the client identity should be removed from ThreadLocal on Context.close(), or J2SE security (doPrivileged) could be used to hold the principal.

    Apache's JIRA Issue Tracker | 8 years ago | Martin Vysny
    javax.naming.AuthenticationException: User could not be authenticated: karolko [Root exception is javax.security.auth.login.LoginException: Thread already associated with a client identity. Refusing to overwrite.]]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Digest Authentication LDAP ADAM on multi Domains Active Directory

    Oracle Community | 1 decade ago | 843793
    javax.naming.AuthenticationException: SASL authentication failed. Root exception is java.lang.IllegalArgumentException: Cannot match 'java.naming.security.sasl.realm' property value, 'parint.emeaint.cib' with choices emeaint.cib,O=cib,in RealmChoiceCallback
  6. 0

    [OpenEJB-users] OpenEJB local interfaces JNDI security - Grokbase

    grokbase.com | 7 months ago
    javax.naming.AuthenticationException: User could not be authenticated: karolko [Root exception is javax.security.auth.login.LoginException: Thread already associated with a client identity. Refusing to overwrite.]] at org.apache.openejb.client.LocalInitialContextFactory.getIntraVmContext(LocalInitialContextFactory.java:116) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:41) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.naming.AuthenticationException

      javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!

      at sun.security.krb5.EncryptionKey.<init>()
    2. Java RT
      LoginContext.login
      1. sun.security.krb5.EncryptionKey.<init>(EncryptionKey.java:212)
      2. sun.security.krb5.EncryptionKey.acquireSecretKeys(EncryptionKey.java:190)
      3. sun.security.krb5.EncryptionKey.acquireSecretKeys(EncryptionKey.java:158)
      4. com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:656)
      5. com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:542)
      6. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      7. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      8. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      9. java.lang.reflect.Method.invoke(Method.java:585)
      10. javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
      11. javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
      12. javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
      13. java.security.AccessController.doPrivileged(Native Method)
      14. javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
      15. javax.security.auth.login.LoginContext.login(LoginContext.java:579)
      15 frames
    3. com.sun.vda
      ClientRequestWorker.run
      1. com.sun.vda.service.ldap.ADConnection.kerberosLogin(ADConnection.java:151)
      2. com.sun.vda.service.ldap.UserDirConnection.checkUserCredentials(UserDirConnection.java:230)
      3. com.sun.vda.service.client.ClientRequestWorker.authenticate(ClientRequestWorker.java:139)
      4. com.sun.vda.service.client.ClientRequestWorker.execute(ClientRequestWorker.java:117)
      5. com.sun.vda.service.client.ClientRequestWorker.run(ClientRequestWorker.java:74)
      5 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      3. java.lang.Thread.run(Thread.java:595)
      3 frames
    5. com.sun.vda
      ClientRequestWorker.run
      1. com.sun.vda.service.ldap.ADConnection.processException(ADConnection.java:392)
      2. com.sun.vda.service.ldap.ADConnection.kerberosLogin(ADConnection.java:153)
      3. com.sun.vda.service.ldap.UserDirConnection.checkUserCredentials(UserDirConnection.java:230)
      4. com.sun.vda.service.client.ClientRequestWorker.authenticate(ClientRequestWorker.java:139)
      5. com.sun.vda.service.client.ClientRequestWorker.execute(ClientRequestWorker.java:117)
      6. com.sun.vda.service.client.ClientRequestWorker.run(ClientRequestWorker.java:74)
      6 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      3. java.lang.Thread.run(Thread.java:595)
      3 frames