This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Connection.connect is somewhere you have somehow sent a null reference to something.
That has got there via Connection<init> which means the Connector constructor.
The line numbers don't seem to match the code you have supplied.
Most likely cause:
You have managed to pass something null to the Connection constructor. Make sure every argument you pass actually has an object attached to it.
Joined: Apr 15, 2009
Thanks Campbell Ritchie, I did something silly and returned a null after a try catch block without having a return *inside* the try catch block.