Jackie G.
unread,Aug 2, 2011, 12:30:14 PM8/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mybatis-user
I have 2 methods...
static final String SELECT_RESOURCES_LIKE_KEY = "select
PROPERTYID,STOREID,LANGUAGEID,"+
"TEXTKEY,TEXTVALUE, BUNDLE, DESCRIPTION "+
"from XPROPERTY_ITEM "+
"where UPPER(TEXTKEY) like #{textKey} "+
"and LANGUAGEID = #{languageId} "+
"order by TEXTKEY " +
"FETCH FIRST 25 ROWS ONLY";
@Select(SELECT_RESOURCES_LIKE_KEY)
@Results()
public List<PropertyItem> selectResourcesLikeKey(@Param("textKey")
String textKey, @Param("languageId") Integer languageId);
This one seems to work just fine, however, within the same mapper
interface I have...
static final String SELECT_RESOURCES_BY_KEY_LANGUAGE_STORE_ID_BUNDLE
="select PROPERTYID,STOREID,LANGUAGEID,"+
"TEXTKEY,TEXTVALUE, BUNDLE, DESCRIPTION "+
"from XPROPERTY_ITEM "+
"where TEXTKEY = #{textKey} "+
"and LANGUAGEID = #{languageId} "+
"and STOREID = #{storeId} "+
"AND BUNDLE = #{bundle}";
@Select(SELECT_RESOURCES_BY_KEY_LANGUAGE_STORE_ID_BUNDLE)
public PropertyItem
selectResourcesByKeyLanguageStoreIdBundle(@Param("textKey") String
textKey, @Param("languageId") Integer languageId, @Param("storeId")
Integer storeId, @Param("bundle") String bundle);
This fails with a error of
SEVERE: Servlet.service() for servlet dispatcher threw exception
java.lang.IllegalArgumentException: Mapped Statements collection does
not contain value for
com.anfcorp.ecommerce.textmanagement.mapper.PropertyItemMapper.selectResourcesByKeyLanguageStoreIdBundle
at org.apache.ibatis.session.Configuration
$StrictMap.get(Configuration.java:593)
at
org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:
393)
at
org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:
160)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:
48)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:37)
at $Proxy22.selectResourcesByKeyLanguageStoreIdBundle(Unknown Source)
Please help this is really holding us up and hurting my chances of
pushing out a mybatis mapping solution.