ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Pannell <steven.pann...@zooplus.com>
Subject how does queryForMap work?
Date Wed, 30 Mar 2005 15:03:35 GMT
Hi,

I'm trying to use queryForMap but keep getting the following error (this is
the first time I tried this):


--- The error occurred while applying a result map.  
--- Check the getDiscount-AutoResultMap.  
--- Check the result mapping for the 'PERCENTAGE' property.  
--- Cause: com.ibatis.common.exception.NestedRuntimeException:
JavaBeansDataExchange could not instantiate result class.  Cause:
java.lang.InstantiationException: java.util.Map
Caused by: java.lang.InstantiationException: java.util.Map
Caused by: com.ibatis.common.exception.NestedRuntimeException:
JavaBeansDataExchange could not instantiate result class.  Cause:
java.lang.InstantiationException: java.util.Map


My code and map are as follows:

        Map product2Discount =
client.queryForMap("getDiscountGroupProductDiscount", "myId", "productId");

	<select id="getDiscountGroupProductDiscount" parameterClass="string"
		resultClass="map">
			select productId, percentage
			from discount 
			where myId = #myId#
	</select>


Anyone have an idea what I did wrong??

THX
Steve.


Mime
View raw message