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.
I did not look at your code in detail, but looks like you are catching the exception and just calling printStacktrace(). This is not a good thing to do (specially in a server environment). The code is effectively eating up the exception.
You might want to first fix that and see if there are any errors thrown during the program execution.