I would usually try to get the code to compile successfully, before trying to debug it.
You seem to have omitted a few things here. Additionally, if you could provide a simple main() method that uses the class in a way that demonstrates the error you're talking about, that would be helpful. Or failing that, show us the error you get (with stack trace), and see what exactly is at the line numbers which are referenced in the stack trace. That will probably be more helpful that letting us look at the code from scratch and trying to guess what you're doing.