John Landon wrote:And I know it doesn't repeat because it doesn't lead me to exact line where exception happened. I follow the trace to get the initial problem but it just cuts. So all I know is in what method it happened. but not in what line
Well, for an NPE, what you really need is the first "at" line after the last "caused by". Do you have that, at least? In my example above, the equivalent would be the line referring to "(StackTraces.java:16)".
If you're missing even this... well, I can think of one common scenario where this might be considered acceptable. If you're contacting another computer across a network of some sort, and an exception occurs on the other computer, you may receive a truncated stack trace. Or no stack trace at all. In such cases, your best bet may be to look for a log file on the
other machine, containing a more complete stack trace.
Another possibility is that the source code you're looking at is not exactly the same as the code that you're running. Perhaps you're using a library in a jar, and there's more than one version available?