• Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassCastException: com.sun.jndi.ldap.LdapCtxFactory

 
sanju dharma
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , I am getting following exception when I run my application on Solaris. Surprisingly , I am not getting this exception on NT. Also I am not getting this exception with jdk1.1.8 . But I am using Java 2 for my development.
anybody has a clue ?
Urgent reply is appreciated.
javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory. Root exception is java.lang.ClassCastException: com.sun.jndi.ldap.LdapCtxFactory
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:655)
Thank you very much in advance,
Sudhir
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sudhir dharmadhikari:
Hi , I am getting following exception when I run my application on Solaris. Surprisingly , I am not getting this exception on NT. Also I am not getting this exception with jdk1.1.8 . But I am using Java 2 for my development.
anybody has a clue ?
Urgent reply is appreciated.
javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory. Root exception is java.lang.ClassCastException: com.sun.jndi.ldap.LdapCtxFactory
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:655)
Thank you very much in advance,
Sudhir

If you have downloaded the JNDI service for LDAP, check if the services (both API and SPI) are in the classpath.
Hope this helps,
Sandeep
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!