Why I am getting this error when using JDBC input plugin of Logstash

I know that in your case you are not calling a stored procedure, but I think this solution could apply to your problem as well as the plugin apparently only creates the "SELECT TOP (1) … " query in debug mode?