简体   繁体   English

org.hibernate.hql.ast.QuerySyntaxException

[英]org.hibernate.hql.ast.QuerySyntaxException

I am getting this Exception:org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree when i excute this below query : 我收到以下Exception:org.hibernate.hql.ast.QuerySyntaxException:当我执行以下查询时,子树的意外结束:

<query name="fetchCSpecificationByAttIdExtId">      
 <![CDATA[from
> CProductSpecifications where attributeId=:attributeId  and
> extractedProductId in (:extractedList)]]>     </query>

detailed stack trace is: 详细的堆栈跟踪为:

  org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree
   [ from com.bemol.dao.product.CProductSpecifications where attributeId=:attributeId  and extractedProductId in ()
         ]

Service method which calls this query is : 调用此查询的服务方法是:

List<CProductSpecifications> cSpecList=(List<CProductSpecifications>)this.baseDao.findByNamedQueryAndNamedParam("fetchCSpecificationByAttIdExtId", new String[]{"attributeId","extractedList"},new Object[]{aid,extractedList});

Perhaps extractedList is empty? 也许extractList为空? Try to do an empty check first. 尝试先做一个空支票。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM