Originally posted by Mani Ram:
The only place where I have found it difficult to track the NPEs are when the code looks something like this
You never know, which object is null here, even with stack traces. You will need some debug code to find out what went wrong.