-
Bug
-
Resolution: Done
-
Major
-
29.0.1.Final, 30.0.1.Final
WF 30.0.1 and allegedly 29 or later but not 28 fails with:
javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory com.sun.jndi.dns.DnsContextFactory from classloader ModuleClassLoader for Module "deployment.jespa.war" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.dns.DnsContextFactory from [Module "deployment.jespa.war" from Service Module Loader]]
at org.jboss.as.naming@31.0.1.Final//org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:103)
at org.jboss.as.naming@31.0.1.Final//org.jboss.as.naming.InitialContext.init(InitialContext.java:84)
at java.naming/javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
at org.jboss.as.naming@31.0.1.Final//org.jboss.as.naming.InitialContext.<init>(InitialContext.java:74)
at org.jboss.as.naming@31.0.1.Final//org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:26)
at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)
at java.naming/javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
at deployment.jespa.war//jespa.dns.Dns.getRecordsByName0(Dns.java:207)
at deployment.jespa.war//jespa.dns.Dns.getRecordsByName(Dns.java:363)
...
when trying to instantiate InitialDirContext with a dns:// java.naming.provider.url.
Presumably this is not intentional behavior because the default JAVA_OPTS has --add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED and because being able to do DNS manually is an important use case (such as for doing SRV lookups of Windows domain controllers in corp environments).
Note that com.sun.jndi.ldap classes load fine.
- depends on
-
WFCORE-6887 Introduce new phase STRUCTURE_NAMING_JDK_DEPENDENCIES
-
- Resolved
-
- is cloned by
-
JBEAP-27664 (8.0.z) WFLY-19339 - Failed to instantiate InitialContextFactory com.sun.jndi.dns.DnsContextFactory
-
- Pull Request Sent
-