-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
9-repo-jigsaw
-
generic
-
generic
It only happens in hybird mode.
Both jdk.jndi and jdk.jndi.internal have been included in tested module-info.java.
It still throws below exception:
================
STATUS:Failed.Failed: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory : requested by +test.hybrid ]
STATUS:Failed.Failed: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory : requested by +test.hybrid]
================
It looks LdapCtxFactory has been included in lib/modules/jdk.jndi/8-ea/classes really:
================
gtee@jsn-sb2500-5: ~ $ jar -tf /java/sqe/comp/jsn/users/amylu/jigsaw/solaris-amd64/lib/modules/jdk.jndi/8-ea/classes | grep LdapCtxFactory
com/sun/jndi/ldap/LdapCtxFactory.class
================
It fails only because it is not exported in jmod. Below is a output fragment of "jmod ls -v". It does not include com.sun.jndi.ldap package in jdk.jndi category
======================
jdk.jndi@8-ea
requires local jdk.auth.internal@=8-ea
requires local jdk.base.internal@=8-ea
requires optional jdk.desktop@=8-ea
requires jdk.rmi@=8-ea
requires jdk.tls.internal@=8-ea
requires synthesized java.base@>=7
requires service optional javax.naming.ldap.StartTlsResponse
provides javax.naming
provides service sun.net.spi.nameservice.NameServiceDescriptor with sun.net.spi.nameservice.dns.DNSNameServiceDescriptor
exports
com.sun.security.auth
com.sun.security.auth.module
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
view jdk.jndi.internal
permits jdk.cosnaming, jdk.kerberos
exports
com.sun.jndi.toolkit.url
com.sun.security.auth
com.sun.security.auth.module
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
sun.net.dns
======================
Both jdk.jndi and jdk.jndi.internal have been included in tested module-info.java.
It still throws below exception:
================
STATUS:Failed.Failed: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory : requested by +test.hybrid ]
STATUS:Failed.Failed: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory : requested by +test.hybrid]
================
It looks LdapCtxFactory has been included in lib/modules/jdk.jndi/8-ea/classes really:
================
gtee@jsn-sb2500-5: ~ $ jar -tf /java/sqe/comp/jsn/users/amylu/jigsaw/solaris-amd64/lib/modules/jdk.jndi/8-ea/classes | grep LdapCtxFactory
com/sun/jndi/ldap/LdapCtxFactory.class
================
It fails only because it is not exported in jmod. Below is a output fragment of "jmod ls -v". It does not include com.sun.jndi.ldap package in jdk.jndi category
======================
jdk.jndi@8-ea
requires local jdk.auth.internal@=8-ea
requires local jdk.base.internal@=8-ea
requires optional jdk.desktop@=8-ea
requires jdk.rmi@=8-ea
requires jdk.tls.internal@=8-ea
requires synthesized java.base@>=7
requires service optional javax.naming.ldap.StartTlsResponse
provides javax.naming
provides service sun.net.spi.nameservice.NameServiceDescriptor with sun.net.spi.nameservice.dns.DNSNameServiceDescriptor
exports
com.sun.security.auth
com.sun.security.auth.module
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
view jdk.jndi.internal
permits jdk.cosnaming, jdk.kerberos
exports
com.sun.jndi.toolkit.url
com.sun.security.auth
com.sun.security.auth.module
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
sun.net.dns
======================