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.

Java Call

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.

Need Your Help

AngularJS Decorator without object.defineProperty

javascript angularjs polyfills es5-shim angular-decorator

How do I use decorators without having access to object.defineProperty?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.