jdbc update; fix bugs; handling exception; add logs. tested