Originally posted by Ulf Dittmer: So ... what does the code do? Where does it go wrong?
It appears to return null, which looks to me as though it would be better with void return type. It also declares "Exception," and catches it simultaneously. Both those features will make that method hard to use.