Ibatis报错

[ERROR][2013-11-19 20:03:25,586][com.XXX.dhm.portalMS.base.web.interceptor.LogInterceptor][com.XXX.dhm.portalMS.resource.web.action.ResourceCategoryAction.findReadyUpShelf]
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];   
--- The error occurred in ibatis/oracle/resource-category.xml.  
--- The error occurred while preparing the mapped statement for execution.  
--- Check the Category.findReadyUpShelf.  
--- Check the parameter map.  
--- Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'providerid' in class 'com.XXX.dhm.portalMS.resource.entity.CategoryResource'; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   


CategoryResource类中为providerId  而providerid no READABLE property 所以这里的配置是区分类字段大小写的

        <isNotEmpty  prepend="and" property="categoryResource.providerid">
              a.providerid in #categoryResource.providerid#
          </isNotEmpty>   
改为

       <isNotEmpty  prepend="and" property="categoryResource.providerId">
              a.providerid in #categoryResource.providerid#
          </isNotEmpty>   

不报错了!!

这里a.providerid in #categoryResource.providerid# 跟类不一致也会报错!!

IBatis配置文件区分大小写!!!


catResource.setProviderId(cpProviders);

CategoryResource [asset_Code=null, proName=null, providerId=('GZCTV','AVIT'), prodoffering_id=null, resourceId=null, resourceName=null, videoType=null, pvideoType=null, resourceRank=0, spName=null, goodsName=null, goodsPrice=0.0, goodsCode=null, assetId=null, cityId=100000, cityName=null, mediaType=null]

providerId 应该在CategoryResource类中加到

 @Override
    public String toString()
    {
        StringBuilder builder = new StringBuilder();
        builder.append("CategoryResource [asset_Code=");
        builder.append(asset_Code);
        builder.append(", proName=");
        builder.append(proName);   
        builder.append(", providerId=");
        builder.append(providerId);
 才会出来!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值