javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.jndi.LDAPCtxFactory
 Technote (FAQ)
 
Problem
WebSphere® Application Server version 3.5.x includes an implementation of LDAP JNDI™. It is in WAS_HOME/lib/ujc.jar. The initial context factory is com.ibm.jndi.LDAPCtxFactory.

After migration to WebSphere Application Server 4.0.x, the following exception is issued:

javax.naming.NoInitialContextException com.ibm.jndi.LDAPCtxFactory
javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.jndi.LDAPCtxFactory
at java.lang.Exception.<init> (Compiled Code)
at javax.naming.NamingException.<init> (Compiled Code)
at javax.naming.NoInitialContextException.<init> (Compiled Code)
at javax.naming.spi.NamingManager.getDefaultInitialContextFactory (Compiled Code)
at javax.naming.spi.NamingManager.getInitialContext (Compiled Code)
at javax.naming.InitialContext.getDefaultInitCtx (Compiled Code)
at javax.naming.InitialContext.<init> (Compiled Code)
at javax.naming.directory.InitialDirContext.<init> (Compiled Code)
at oops.main(Compiled Code)
 
Solution
Use Sun's initial context factory: com.sun.jndi.ldap.LdapCtxFactory.

The context factory com.ibm.jndi.LDAPCtxFactory is no longer supported in WebSphere Application Server version 4.0.x.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Migration
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1054123
IBM Group: Software Group
Modified date: Nov 30, 2004