 <p>You are only catching <code>SQLException</code> objects, and <code>NullPointerException</code> is not a subclass of <code>SQLException</code>. You can insert <code>NullPointerException|</code> to catch those also; see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html" rel="nofollow">http://docs.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html</a>.</p>