People Using Spring, EJBs Don't Know Basic JDBCMay 30, 2007 · 1 minute read · Comments
I recently found a bug in software we are developing. I traced it and found the root was improper JDBC handling. The application is written using EJBs, Spring and plenty of other relatively complex technologies. I was surprised that developers who were able to use all those technologies had no understanding of basic JDBC.
They fetched all the data (including double, decimal numbers) from the database as String using rs.getString() !
While this is most of the time possible, it is also most of the time not desirable (in the code they were actually converting it to numbers, etc.). More importantly, this can lead to nasty bugs due to different Locales (the . vs , game for example). And this is what's happening in our application.