ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject Calendar result class
Date Fri, 06 Feb 2009 20:00:37 GMT
This should be so simple but I must be overlooking something. I currently 
have a TypeHandlerCallback defined that handles a TIMESTAMP to a 
java.util.Calendar, and it works perfectly. But now I want to do something 
really simple. I would like to execute the following to get the database 
current time:

SELECT getDate()  -- (Sybase ASE)

and I think that all I need is the following in my SQL Map:

  <select id="getCurrentDBTime" resultClass="java.util.Calendar" >
    SELECT getDate()
  </select>

but this causes the following exception:

--- The error occured while instantiating the result object 
--- Cause: java.lang.RuntimeException: JavaBeansDataExchange could not 
instantiate result class.  Cause: java.lang.IllegalAccessException: Class 
com.ibatis.common.resources.Resources can not access a member of class 
java.util.Calendar with modifiers "protected"


So clearly my TypeHandlerCallback is not being invoked. So what am I 
overlooking? 

Thanks for the help...
Chris 
Mime
View raw message