java.lang.StringIndexOutOfBoundsException: String index out of range: 0错误的原因

2015-10-10 09:41:00
admin
原创
2988
摘要

java.lang.StringIndexOutOfBoundsException: String index out of range: 0

在hibernate做查询的时候

List<?> listObject = sqlQuery
.setFirstResult((currentPageIndex - 2) * showCounts)
.setMaxResults(showCounts)
.setResultTransformer(
org.hibernate.transform.Transformers.ALIAS_TO_ENTITY_MAP)
.list();
当查询的数据在数据库中不能为空,但是在数据库中为空的时候,会报这种错误,这是因为数据库的数据的问题。

发表评论
评论通过审核之后才会显示。
文章分类
联系方式
联系人: 郑州-小万
电话: 13803993919
Email: 1027060531@qq.com
QQ: 1027060531
网址: www.wanhejia.com