我收到此异常:org.hibernate.hql.ast.QuerySyntaxException:意外的子树结束 当我执行以下查询时:
<query name="fetchCSpecificationByAttIdExtId">
<![CDATA[from
> CProductSpecifications where attributeId=:attributeId and
> extractedProductId in (:extractedList)]]> </query>
详细的堆栈跟踪是:
org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree
[ from com.bemol.dao.product.CProductSpecifications where attributeId=:attributeId and extractedProductId in ()
]
调用此查询的服务方法是:
List<CProductSpecifications> cSpecList=(List<CProductSpecifications>)this.baseDao.findByNamedQueryAndNamedParam("fetchCSpecificationByAttIdExtId", new String[]{"attributeId","extractedList"},new Object[]{aid,extractedList});
答案 0 :(得分:0)
也许extractList是空的?首先尝试进行空检查。