java.lang.NumberFormatException: For input string: "id"
dao层:Stringhql="selectid,namefromType";在jsp页面中,报了java.lang.NumberFormatException:Fori...
dao层: String hql = "select id,name from Type "; 在jsp页面中,报了java.lang.NumberFormatException: For input string: "id"当我把 dao层: String hql = "select id,name from Type ";改成 String hql = "from type"; 可以成功运行这是美国人说的原因:When using "select" in HQL, hibernate considers it a projection query and your find method returns a List of Object[] not of User objects. Your jsp then uses the dot notation on an array.
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询