java.sql.SQLException: Invalid column index using jdbcTemplate

二次信任 提交于 2019-12-02 04:27:07

You are using queryForObject(java.lang.String, java.lang.Object[], java.lang.Class) , which expects an array of objects to bind to a PreparedStatement type query with placeholders.

Your query is probably missing placeholders, e.g :

select a.firstname from TEST a where id = ?

You get errors about invalid column indexes, because the content of your array cannot currently be mapped to any placeholders indexes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!