KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How to load data from JDBCTemplate.queryForMap() as it returns the Map Interface? How is the query data maintained internally in the map? I tried to load it, but I got this exception: org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result Code:- public List getUserInfoByAlll() { List profilelist=new ArrayList(); Map m=new HashMap(); m=this.jdbctemplate.queryForMap("SELECT userid,username FROM USER"); Set s=m.keySet(); Iterator it=s.iterator(); while(it.hasNext()){ String its=(String)it.next(); Object ob=(Object)m.get(its); log.info("UserDAOImpl::getUserListSize()"+ob); } return profilelist; }
Tags (comma-separated)
Save Edits
Cancel