I have a HashMap storing data which I retrieve and want to write to the database, but the code executes OK but does not write to the DB. and debug tells me that the method addRecord is (out of sync)
"Private Parts", Welcome to the JavaRanch! We're pretty light on rules round these parts, but one rule we take quite seriously is the one on display names. You can read the full version here.
Basically we require your display name to be two words: your first name, a space, then your last name. Obviously fictitious names are not allowed..
Please edit your profile and select a display name which matches the display name rules. PLease do it soon, since accounts with invalid display names get deleted, often without warning.
Are you sure an exception is not being thrown and you're missing it? Depending on the servlet container you'e using, System.out's may not be retained. That is, they get discarded and not displayed or saved anywhere. Better to look into a logging framework like Log4J.
You're not really handling the exceptions, so it may be better to propagate them ie throw them out of the method. Other than that the code looks fine, but I didn't look too closely.