This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes NullPointerException in LdapClient.usingSaslStreams() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "NullPointerException in LdapClient.usingSaslStreams()" Watch "NullPointerException in LdapClient.usingSaslStreams()" New topic

NullPointerException in LdapClient.usingSaslStreams()

Alexander Sinyushkin

Joined: Jan 15, 2009
Posts: 1
Hi all,

I've been facing one strange problem with JNDI recently. We have some software written for communicating with a central LDAP server (Sun Directory Server). The soft was tested and then put into production.

But in the production environment the client started getting this error:

From the stack trace above you can see that it fails inside the JNDI:

So, there's only one possibility where this code can failed - conn is null here. Have anyone met something like that? How can that be worked around? So far we just catch the NPE, close the entire context and create a new one. Any ideas will be appreciated.

I agree. Here's the link:
subject: NullPointerException in LdapClient.usingSaslStreams()