If you were using JNDI to access a LDAP server and received the PartialResultException, you may have been puzzled by this error and wondered what was going on.


The JavaDoc of the javax.naming.PartialResultException does not give you much information about the error. It just says that the result being returned is partial and that's it.

Consider this situation:- if one of the LDAP entries refers to another LDAP entry that is located in another LDAP server, then the JNDI provider has to decide what to do with it. According to the Context.REFERRAL property setting, you have the following options.

  • "follow" - follow referrals automatically
  • "ignore" - ignore referrals
  • "throw" - throw ReferralException when a referral is encountered.

If this property is not specified, the default is determined by the provider.


For more detail, please follow this link Referrals in the JNDI.