Passed all tests for jdbc-driver branch

Fixed contests API test sql files.
Fixed a bug in jdbc-wrapper.js for error handling.
Fixed jdbc test code.