JDBCTemplate returns data when debugging but not during normal operation
Inside a web application, Spring's JdbcTemplate returns an empty list for some simple sql (SELECT * FROM view_name -- view_name is a view of one column) where there is known data.
When I use the remote java application debugger with eclipse/tomcat, the query returns the results as expected.
List<String> results = new ArrayList<String>(); results = jdbcTemplate.queryForList("select * from view_name", String.class)
I enabled Spring's jdbc logging (level DEBUG) and there is no difference in the output between debugging or normal runs other than results don't return with normal operation. I'm looking for any sort of pointers or other debugging tips to solve this issue.
The simple solution was to add a semi-colon to the query (e.g. select * from view_name;). I'm guessing that this idiosyncracy is more a function of PostGRES than Spring.