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);
才会出来!