This week's book giveaway is in the Spring forum. We're giving away four copies of Java Persistence with Spring Data and Hibernate and have Cătălin Tudose on-line! See this thread for details.
Maybe the code sample requires the password be in the form of a number.
By the way: Do you know under which circumstances that sort of code can fail with an exception?