title: Stack trace shows exception at wrong position
body: <p>I'm dealing with a null pointer exception for which I have a stack trace. In my log files, stack traces provide line numbers. It seems like the line numbers on the exception's stack trace are wrong. This is in a project that's new to me.</p>
  
  <p>When I look at the source code at the specified lines, there is sometimes no code (a blank line) or an end curly brace (<code>}</code>), so I'm unable to find the cause of the <code>NullPointerException</code>.</p>
  
  <blockquote>
    <p>java.lang.NullPointerException  at<br>
    com.test.AddProductServlet.list(AddProductServlet.java:776)<br>
      at<br>
    com.test.AddProductServlet.list(AddProductServlet.java:436)<br>
      at<br>
    com.test.AddProductServlet.routeAction(AddProductServlet.java:263)<br>
      at<br>
    com.test.AddProductServlet.onService(AddProductServlet.java:145)<br>
      at<br>
    com.test.MqServlet.service(MqServlet.java:500)<br>
      at<br>
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)</p>
  </blockquote>
  
  <p>I inserted breakpoints before the lines from the stack trace (i.e. 770, 430 and 260) and still can't find the cause of the exception.</p>
  
  <p>I am using Eclipse Helios with Java 1.6.0_16. Is this an Eclipse problem? If so, what changes are required?</p>
  
  <p>I redeployed the project but still have the same problem.</p>
  
  <p>What do I do next? How can I solve this problem?</p>