摘要:
转自:http://loquat.iteye.com/blog/818547报错:java.lang.Long cannot be cast to java.lang.Integer Long 无法转化成Integer类型. 这个异常 经常出现在hinbernate分页查询的时候.原因: 这里在Hibernate2.0之前版本list.get(0)返回的是Integer类型. 但是在Hibernate3.0以后版本list.get(0)返回的是Long类型. 所以在这里不可以由Long型强转成Integer类型.Integer属于不可更改类型,而且Long和Integer没有任何继承关系,当然 阅读全文