Hi,

We have some older code that uses the Sun LDAP JDK (ldapjdk.jar) which, 
when run under JRE 1.42, works fine.  In this code, we do a search() in 
a try, with a catch, and in the catch, we do some output 
(System.out.println()).  This looks something like:

try {
.
.
ld.search(....);
.
.
} catch (LDAPReferralException e) {
   System.out.println("xxxx");
   System.out.println("xxx" + e.toString());
   .
   }


However, when we run this code under JRE 1.50_05, the code inside the 
catch is throwing what appears to be a Nullpointerexception at any line 
that is using e.toString().

I don't think the LDAPReferralException object itself is null, because 
some other methods on the object (e.g., e.getMessage()) seem to work.

We've tried a number of things, including re-compiling the code under 
JDK 1.50_05, but still see the same problem.

The only workaround for this that we've found so far is to either:

- Re-code to not use/output e.toString(), or
- Put the System.out.println(...e.toString()) inside another try (i.e., 
putting a try inside the catch).

Again, this problem only appears if the code is run under JRE 1.50.  It 
works fine when run under JRE 1.42_xx.

We can do the re-code, but I'm curious if anyone else has run across this?

Thanks,
Jim
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap

Reply via email to