大梦想家

5年开发工程师,2年实施经理,X年售前顾问,......
数据加载中……
Could not instantiate class XXX from tuple at AliasToBeanConstructorResultTransformer 的处理办法
今天客户方服务器上突然有一个功能保存了,查看日志信息后发现,错误信息:
Could not instantiate class XXX from tuple at AliasToBeanConstructorResultTransformer...

Google了很久才发现有可能是HQL语句中别名的问题,具体原因未知,现在处理办法是,将下面的语句中的别名去掉:

StringBuffer hql = new StringBuffer("select new ContractItem(l, "
+ " pi.unitPrice, " + " pi.currencyType, " + "pi.currencyTypeDisplay," + " pi.units, "
+ " sum(pi.quantity + pi.adjQuantity), " + " pp, " + " pi.task) "
+ " from PurchasePlanItem pi " + " join pi.purchasePlan pp"
+ " join pi.priorList l " + " where l.supplierNo = ?  "
+ " and pp.id in (");
具体是否可以解决,还要看一会儿的部署情况。


客户虐我千百遍,我待客户如初恋!

posted on 2013-01-09 10:57 阿南 阅读(2267) 评论(0)  编辑  收藏 所属分类: 个人原创


只有注册用户登录后才能发表评论。


网站导航: