]
Jan Kalina updated WFLY-7278:
-----------------------------
Summary: Unable to add trust-manager with ldap-key-store (classloading) (was: Unable
to add trust-manager with ldap-key-store)
Unable to add trust-manager with ldap-key-store (classloading)
--------------------------------------------------------------
Key: WFLY-7278
URL:
https://issues.jboss.org/browse/WFLY-7278
Project: WildFly
Issue Type: Bug
Components: Security
Reporter: Jan Kalina
Assignee: Jan Kalina
When *ldap-key-store* is used in *trust-manager*, trust-manager creation fails:
{code:java}
Caused by: javax.naming.NamingException: WFLYNAM0027: Failed instantiate
InitialContextFactory com.sun.jndi.ldap.LdapCtxFactory from classloader ModuleClassLoader
for Module "org.wildfly.extension.elytron:main" from local module loader
@77a57272 (finder: local module finder @7181ae3f (roots:
/home/jkalina/wildfly/wildfly/build/target/wildfly-11.0.0.Alpha1-SNAPSHOT/modules,/home/jkalina/wildfly/wildfly/build/target/wildfly-11.0.0.Alpha1-SNAPSHOT/modules/system/layers/base))
[Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory from
[Module "org.wildfly.extension.elytron:main" from local module loader @77a57272
(finder: local module finder @7181ae3f (roots:
/home/jkalina/wildfly/wildfly/build/target/wildfly-11.0.0.Alpha1-SNAPSHOT/modules,/home/jkalina/wildfly/wildfly/build/target/wildfly-11.0.0.Alpha1-SNAPSHOT/modules/system/layers/base))]]
at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:118)
at org.jboss.as.naming.InitialContext.init(InitialContext.java:99)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:89)
at
org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:43)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
at
org.wildfly.security.auth.realm.ldap.SimpleDirContextFactoryBuilder$SimpleDirContextFactory.createDirContext(SimpleDirContextFactoryBuilder.java:286)
at
org.wildfly.security.auth.realm.ldap.SimpleDirContextFactoryBuilder$SimpleDirContextFactory.obtainDirContext(SimpleDirContextFactoryBuilder.java:222)
at
org.wildfly.extension.elytron.DirContextDefinition.lambda$null$0(DirContextDefinition.java:148)
at
org.wildfly.security.keystore.LdapKeyStoreSpi.obtainDirContext(LdapKeyStoreSpi.java:120)
... 16 more
java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory from [Module
"org.wildfly.extension.elytron:main" from local module loader @77a57272 (finder:
local module finder @7181ae3f (roots:
/home/jkalina/wildfly/wildfly/build/target/wildfly-11.0.0.Alpha1-SNAPSHOT/modules,/home/jkalina/wildfly/wildfly/build/target/wildfly-11.0.0.Alpha1-SNAPSHOT/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:199)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:364)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:352)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:94)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:113)
... 28 more
{code}
Direct key-store aliases listing using works ok:
{code:java}
/subsystem=elytron/ldap-key-store=LKS1/:read-children-names(child-type=alias)
{code}