How to retrieve a Java object from LDAP server?
1 posts in topic
Flat View  Flat View

Posted By:   Lawrence_Ngan
Posted On:   Monday, June 18, 2001 10:43 AM

I tried to retrieve a Java object from
Netscape LDAP Server 4.13 via JNDI.

The lookup returns successfully a
javax.naming.Reference object referening
my object. However,
I want to get the object referenced
by tbe javax.naming.Reference. I tried
casting the javax.naming.Reference
object to the my object class but
I got java.lang.ClassCastException.

How can I get my object?


Re: How to retrieve a Java object from LDAP server?

Posted By:   Nicholas_Whitehead  
Posted On:   Saturday, June 23, 2001 05:26 AM

This happens because the class that the object really is cannot be found in the classpath of the LDAP client. For example, if I were to retrieve a com.ibm.mq.jms.TopicConnectionFactory from LDAP, I would have to have MQ's jar files in my classpath, otherwise, I would get back an uncastable javax.naming.Reference.
About | Sitemap | Contact